UNICODE::COLLATE::CJK::PINYIN(3perl)

πŸ’– NAME πŸ’–

okay bestie, listen up β€” Unicode::Collate::CJK::Pinyin is the whole vibe for weighting CJK Unified Ideographs so they play nice with Unicode::Collate. that's it, that's the name, she does one thing and she EATS πŸ’…


✨ SYNOPSIS ✨

like, here's how you actually call her, no cap:

use Unicode::Collate;
use Unicode::Collate::CJK::Pinyin;

my $collator = Unicode::Collate->new(
    overrideCJK => \&Unicode::Collate::CJK::Pinyin::weightPinyin
);

see that? you just hand weightPinyin over to overrideCJK and she takes it from there 🫢


🌸 DESCRIPTION 🌸

so Unicode::Collate::CJK::Pinyin gives you one little function: weightPinyin().

and that function is literally the moment for overrideCJK in Unicode::Collate β€” it's tailored exactly for that. what it does is make your tailoring of CJK Unified Ideographs land in the order of CLDR's pinyin ordering. pinyin order, bestie. that's the whole point. iconic behavior πŸŽ€


πŸ’€ CAVEAT πŸ’€

okay so slight plot twist, and you need to hear this one:

the pinyin ordering includes some characters that are not CJK Unified Ideographs. and for those? weightPinyin() simply cannot be used for collation. nope. not happening. 🚫

for those characters, use "entry" instead. do not come for weightPinyin() with a non-CJK-Unified-Ideograph, she will not answer the phone 😭

πŸ‘‘ SEE ALSO πŸ‘‘


and that's the page, bestie!! this was perl v5.44.0, dated 2026-10-17, and honestly? she's giving niche-utility-icon realness. go sort your ideographs. mwah πŸ¦‹πŸ’–

πŸ“¦ where this page comes from
  • arch rolling: perl 5.44.0-1 Β· Artistic-1.0-Perl AND GPL-1.0-or-later
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms