utf8-all
utf8-all copied to clipboard
Rewrite string comparisons with Unicode::Collate
From http://stackoverflow.com/questions/6162484/why-does-modern-perl-avoid-utf-8-by-default/#6163129:
String comparisons in Perl using eq, ne, lc, cmp, sort, &c&cc are always wrong. So instead of @a = sort @b
, you need @a = Unicode::Collate->new->sort(@b)
. Might as well add that to your export PERL5OPTS=-MUnicode::Collate
. You can cache the key for binary comparisons.