Are you sure this is still true? I thought that bug was fixed a little while ago?
ADDENDUM:
I remembered discussing this a while back and I just found my old comment. Someone said "fun fact, gnu grep is slow with UTF8"[1] and I said "funner fact gnu grep was slow with UTF8"[2]. I reran the same grep that I used elsewhere in this discussion with C and with UTF8:
I think you must have a version of GNU grep before 2.7.3 or 2.7.1. The UTF problem seems to have disappeared. There is a decent amount of information in the debian bug report[3].
Your right -- I've been stuck with older RHEL 4 systems at work, and they run grep 2.5.something (although I'm not able to reproduce the problem at home now, maybe I'm not on an old enough RHEL 4 system -- will check when I get back to work). Problem disappears with the grep in RHEL 6. However there are still glitches in the sort command. For example:
There were differences in the output but I am not sure if that is a bug or if it has to do with locale rules for sorting. What do you think is broken with sort?
There seems to be a bug regarding utf and sort in debian[1] but I am not sure if it is the same problem. Do you know if there is a bug in redhat's bugzilla for the issue? Up until this thread I did not realize sort behaved differently depending on the locale.[2] Are you sure its not a difference in locale expectations on how strings are sorted?
The -h option is supposed to sort numerically when the numbers are in "human readable" format (i.e., 42k instead of 42137), as in the matching -h option for ls (and other commands). And the "+4 -5 -h" will sort on the 5'th column. It works great if you aren't using -h (sort +4 -5 -n, with a regular "ls -l" command). Also, works if the number is in the first column (as in: du -h |sort -h).
Thank you for indulging our rather off topic curiosity. Just so I am clear are you saying the reason for the difference in sorting has to do with locale interpretations and is not a bug in sort?
ADDENDUM:
I remembered discussing this a while back and I just found my old comment. Someone said "fun fact, gnu grep is slow with UTF8"[1] and I said "funner fact gnu grep was slow with UTF8"[2]. I reran the same grep that I used elsewhere in this discussion with C and with UTF8:
I think you must have a version of GNU grep before 2.7.3 or 2.7.1. The UTF problem seems to have disappeared. There is a decent amount of information in the debian bug report[3].[1] https://news.ycombinator.com/item?id=2860932
[2] https://news.ycombinator.com/item?id=2862543
[3] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=604408