by binarycrusader · 11y ago · 0 comments
It's not worth the "performance improvement".
$ echo $'a\naa\nb\nå'| LC_ALL=C sort
a
aa
b
å
$ echo $'a\naa\nb\nå'| LC_ALL=nn_NO.UTF-8 sort
a
b
å
aa
Even worse, some characters that are byte-different collate the same: $ echo $'∨\n∧'|LC_ALL=C sort -u
∧
∨
$ echo $'∨\n∧'|sort -u
∨
Handling Unicode sanely requires understanding some Unicode.In general, I'd never do it for performance only, it would have to involve one of the issues you've pointed out (there are some components I build that require it, erroneously IMO).
Knowing that "LC_ALL=C can improve performance but cause UTF problems" is awesome information to base a design on. A blanket statement like "never use LC_ALL=C" is not.
Again, not worth it -- if only for performance sake, generally speaking.