UNICODE::COLLATE::CJK::ZHUYIN(3perl)
β¨ NAME β¨
okay so bestie, this is Unicode::Collate::CJK::Zhuyin, from the Perl Programmers Reference Guide β¨ β it does weighting of CJK Unified Ideographs for Unicode::Collate. like, it gives your collator the zhuyin glow-up it deserves π
πΈ SYNOPSIS πΈ
no cap, this is literally all you gotta do:
use Unicode::Collate;
use Unicode::Collate::CJK::Zhuyin;
my $collator = Unicode::Collate->new(
overrideCJK => \&Unicode::Collate::CJK::Zhuyin::weightZhuyin
);
that's it. that's the whole vibe π
π¦ DESCRIPTION π¦
so Unicode::Collate::CJK::Zhuyin hands you weightZhuyin(), and she is exactly what you want as the overrideCJK for Unicode::Collate. she makes tailoring of CJK Unified Ideographs go in the order of CLDR's zhuyin (bopomofo) ordering. iconic behavior honestly π
like, if you want your CJK ideographs sorted the bopomofo way, this is the function, periodt π
π CAVEAT π
okay bestie, real talk, this is the part where we gotta be careful π
the zhuyin ordering includes some characters that are not CJK Unified Ideographs, and for those ones you simply can't use weightZhuyin() for collation. it's giving "not my jurisdiction." for those characters, use entry instead. no cap, that's the whole workaround π
fr fr do not try to forceweightZhuyin()on non-CJK-Unified-Ideograph characters. she said no. useentry. π«Ά
π 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::Collate
- Unicode::Collate::Locale
go read them if you want the full lore, iykyk π§
and that's the whole page, bestie! π this was Unicod...:Zhuyin(3perl), aka Unicode::Collate::CJK::Zhuyin from perl v5.44.0, dated 2026-10-17. slay, go sort some CJK ideographs, and remember: zhuyin order or nothing π
β¨π
π¦ 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