GNU bug report logs - #17188
Sort bugs

Previous Next

Package: coreutils;

Reported by: Nikos Balkanas <nbalkanas <at> gmail.com>

Date: Sat, 5 Apr 2014 02:27:02 UTC

Severity: normal

Tags: notabug

Merged with 17189

Done: Eric Blake <eblake <at> redhat.com>

Bug is archived. No further changes may be made.

Full log


Message #14 received at control <at> debbugs.gnu.org (full text, mbox):

From: Eric Blake <eblake <at> redhat.com>
To: Nikos Balkanas <nbalkanas <at> gmail.com>, 17189-done <at> debbugs.gnu.org
Subject: Re: bug#17189: Sort bug #2
Date: Sat, 05 Apr 2014 06:23:41 -0600
[Message part 1 (text/plain, inline)]
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

[signature.asc (application/pgp-signature, attachment)]

This bug report was last modified 11 years and 48 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.