Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Rewrite string comparisons with Unicode::Collate #3

doherty opened this Issue May 30, 2011 · 0 comments


None yet
1 participant

doherty commented May 30, 2011

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment