Description of problem: sort command does not sort as expected. The following URL also describe the issue: http://pankaj-k.net/weblog/2007/08/is_gnu_sort_broken.html Version-Release number of selected component (if applicable): $ rpm -q coreutils coreutils-6.9-12.fc8 How reproducible: If the environment variable is not set at all. LC_ALL Steps to Reproduce: 1. Write a file called "a.txt" with the following 3 lines: F-A FB F-C 2. run in shell this command: sort a.txt Actual results: F-A FB F-C Expected results: F-A F-C FB Additional info: In the URL field there is an explanation of why this is happening. BAsically the issue is fixed if we run it in this way: export LC_ALL=POSIX sort a.txt also, it works in this way too: export LC_ALL=C sort a.txt I found the issue getting the bad sort order postgresql, basically the hyphen got ignored. I wonder if the issue is correctly reported here or if it should be reported to another component.
Thanks for report. As written on manpages/info pages of sort and on URL's you have provided - GNU coreutils sort depends (and it is expected behaviour) on locales. It is not only about LC_ALL(which will override all locales), but mostly about LC_COLLATE and LC_NUMERIC (which you have set and probably as en_US.UTF-8 ). Locales are part of glibc-common, so that's the only place where the behaviour could be changed. Feel free to raise bugzilla ticket against that behaviour (LC_COLLATE in en_US.UTF-8 and sort order) - in glibc-common. But I'm not sure if glibc-common maintainer will be interested in changing that behaviour. I already had several similar reports(e.g. #428679), so closing again NOTABUG. Sorry, but I can't help in this case.