bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#17189: Sort bug #2


From: Eric Blake
Subject: bug#17189: Sort bug #2
Date: Sat, 05 Apr 2014 06:23:41 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0

tag 17189 notabug
forcemerge 17188 17189
thanks

On 04/04/2014 10:38 PM, Nikos Balkanas wrote:
> What about this output?

What about it?

> 
> sort -k1 input > out
> 
> 009    2919
> 009    3107
> 0.0     9312
> 00a    3294
> 00A    3389
> 00a    3484
> 00A    3578
> 00a     3670
> 00A    4142
> 00b    4236
> 00B    4332
> 00b    4801
> 
> This is no sorting. It is random garbage. Since when 00a < 00B? This

Ever since the en_US.UTF-8 locale defined strcoll() to sort in
case-insensitive dictionary order by default.

> utility used to work fine in earlier distributions, until you broke it down.

No, earlier distributions merely defaulted to LC_ALL=C instead of
LC_ALL=en_US.UTF-8.  This complaint is the same as your previous one,
and the solution is the same - if you want sorting by bytes, then ensure
that your locale is set to C rather than en_US.UTF-8.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]