[Top][All Lists]

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

bug#8124: sort utilty?

From: Eric Blake
Subject: bug#8124: sort utilty?
Date: Sat, 26 Feb 2011 16:34:23 -0700
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.7

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.

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

Eric Blake   address@hidden    +1-801-349-2682
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]