bug-coreutils
[Top][All Lists]
Advanced

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

bug#11006: But in sort or WAD?


From: Eric Blake
Subject: bug#11006: But in sort or WAD?
Date: Tue, 13 Mar 2012 06:29:01 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20120216 Thunderbird/10.0.1

tag 11006 notabug
thanks

On 03/13/2012 06:20 AM, Philipp Thomas wrote:
> I got this bug report for coreutils 8.14:
> 
> ----------------------------------------------------
> 
> export LANG=en_US.UTF-8
> { echo 16301 3.574885; echo 163 0.171036; } | sort
> 
> Produces
> 
> 16301 3.574885
> 163 0.171036
> 
> 
> which is incorrect.  The lines should be in the other order
> 
> With "LANG=C" it works correctly.
> 
> ----------------------------------------------------
> 
> Is this really a bug or is this because of differing collating rules?

This is correct behavior, and not a bug in sort.  The use of LANG=C to
switch the behavior is indeed intended, as the en_US.UTF-8 really does
collate with punctuation and whitespace elided, where '163013' is before
'163017'.  I suggest you point the original poster to the FAQ.
https://www.gnu.org/software/coreutils/faq/#Sort-does-not-sort-in-normal-order_0021

I'm closing this as not a bug.

-- 
Eric Blake   address@hidden    +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]