GNU bug report logs - #8124
sort utilty?

Previous Next

Package: coreutils;

Reported by: Betty J Barr <barr <at> EGR.UH.EDU>

Date: Sat, 26 Feb 2011 19:29:03 UTC

Severity: normal

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

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eric Blake <eblake <at> redhat.com>
To: Betty J Barr <barr <at> EGR.UH.EDU>
Cc: 8124 <at> debbugs.gnu.org, BABales <at> uh.edu
Subject: bug#8124: sort utilty?
Date: Sat, 26 Feb 2011 16:34:23 -0700
[Message part 1 (text/plain, inline)]
On 02/26/2011 11:28 AM, Betty J Barr wrote:
> I have used the "unix" sort for years without trouble, but suddenly
> something weird is happening. I have a student whose last name is Khan,
> and a student whose last name is Khanal,. The comma immediately follows
> the last name. Obviously Khan should be sorted before Khanal, both from
> the English standpoint and based on the ASCI code for a comma. But it is
> not. Khanal comes first. Why?

Because you are using a locale that regards punctuation as insignificant
in collation sequences.

See this FAQ, then try 'LC_ALL=C sort ...' to see the difference.
 http://www.gnu.org/software/coreutils/faq/#Sort-does-not-sort-in-normal-order_0021

Also, newer coreutils (the latest is 8.10) includes 'sort --debug' to
help diagnose problems like this.

-- 
Eric Blake   eblake <at> redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

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

This bug report was last modified 14 years and 144 days ago.

Previous Next


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