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 forweightPinyin()with a non-CJK-Unified-Ideograph, she will not answer the phone π
π SEE ALSO π
- CLDR β Unicode Common Locale Data Repository β
<http://cldr.unicode.org/> - Unicode Locale Data Markup Language (LDML) β UTS #35 β
<http://www.unicode.org/reports/tr35/> Unicode::CollateUnicode::Collate::Locale
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