Re: sort bug?
Jim Meyering <[email protected]>
| Newsgroups | gmane.comp.gnu.textutils.bugs |
|---|---|
| Message-ID | <[email protected]> |
stefano federici <[email protected]> wrote: > It seems that the -f option (that is the "ignore-case" option) of sort doesn't > work with accented characters. For example the following command > > sort -f -k1 input.txt > output.txt > > where input.txt contains: > > à 1 > à 2 > è 3 > > will output the following output.txt file: > > à 1 > à 2 > è 3 > > instead of the expected: > > à 2 > à 1 > è 3 What version of sort are you using? (run `sort --version') What locale are you using? (run `locale') The locale you use determines how bytes are ordered. There are a few questions in the FAQ that should help you: http://www.gnu.org/software/fileutils/doc/faq/core-utils-faq.html It works fine for me using the latest version and with an appropriate locale settings: $ env LC_ALL=fr_FR sort -f < in à 2 à 1 è 3 If I use the default (C) locale, I get the result that you didn't expect: $ sort -f < in à 1 à 2 è 3