Re: Locales/sort bug
On Thu, 04 Nov 2010 20:29:02 +0100, Rob Gom wrote:
> do you think it's a bug in either libc or coreutils (sort)?
>
> $ cat test.csv
> aph3,"APP",""
> aph3_devel,"TXT",""
> aph3,"MiB",""
>
> $ LC_ALL=C sort test.csv # expected
> aph3,"APP",""
> aph3,"MiB",""
> aph3_devel,"TXT",""
>
> $ LC_ALL=pl_PL sort test.csv # why is that? aph3,"APP",""
> aph3_devel,"TXT",""
> aph3,"MiB",""
>
> $ LC_ALL=pl_PL.UTF-8 sort test.csv # another unexpected output
> aph3,"APP",""
> aph3_devel,"TXT",""
> aph3,"MiB",""
>
> Could anyone give me a hint? I know that this is LC_COLLATE related
> (LC_ALL as shorter version), but don't know whether it is my fault or
> upstream bug.
I'm also getting that behaviour (locale set to "es_ES.UTF-8") so I
understand that my locale setting dictates "underscore" ("_") comes first
than "comma" (",") symbol.
As per "man sort" page:
*** WARNING *** The locale specified by the environment affects sort
order. Set LC_ALL=C to get the traditional sort order that uses native
byte values.
Do you think that is a bug? :-?
Greetings,
--
Camaleón
Reply to: