---------- Forwarded message ----------
From: Michał Janke <[email protected]>
Date: 2011/9/2
Subject: Re: bug#9418: case sensitivity buggy in sort
To: Pádraig Brady <[email protected]>


2011/9/1 Pádraig Brady <[email protected]>:
> On 09/01/2011 06:27 PM, Paul Eggert wrote:
>> This is surely a problem with your locale.
>> Please try setting LC_ALL=C in your environment
>> before running the tests.  E.g., in bash:
>>
>> export LC_ALL=C
>>
>> If that fixes the problem, it's definitely your locale.
>
> I'm marking this done as it's a locale issue.
> Your locale is treating 'a' and 'A' as the equal if
> there is some other part of the string to distinguish on,
> or else is putting lower case before upper case.
>

Yes, that is exactly the case - why on earth would someone want that?
This results in just some sorting madness!

> Do as Paul suggested above to disable this.
> Also note the -s and --debug options.
>
> $ printf "%s\n" 'A' 'a' 'A 1' 'a 2' | sort -bs --debug
> sort: using `en_US.utf8' sorting rules
> a
> _
> A
> _
> A 1
> ___
> a 2
> ___
>
> cheers,
> Pádraig
>



Reply via email to