GNU bug report logs -
#8124
sort utilty?
Previous Next
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
[Message part 1 (text/plain, inline)]
Your message dated Mon, 28 Feb 2011 09:21:10 -0700
with message-id <4D6BCB76.10001 <at> redhat.com>
and subject line Re: bug#8124: sort utilty?
has caused the GNU bug report #8124,
regarding sort utilty?
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
8124: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8124
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
[Message part 3 (text/plain, inline)]
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?
(The two files I have attached are the unsorted version (khan.txt) and the
one produced by
sort +0.0 -0.14 khan.txt >khan.out
Dr. Betty Barr,
University of Houston
[khan.txt (text/plain, attachment)]
[khan.out (text/plain, attachment)]
[Message part 6 (message/rfc822, inline)]
[Message part 7 (text/plain, inline)]
[re-adding the list, for closure on this report]
On 02/28/2011 09:05 AM, Betty J. Barr wrote:
>> 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
> Thank you. Setting the environment did work. Since I am at the mercy of
> our IT people in terms of versions and updates, it was just a shock when
> something I had used for years did not work.
Glad to hear it. Yes, it is rather a shock when upgrading a system
changes the default locale to something different than it was before,
with all sorts of knock-on effects that many people are not expecting;
but it's nothing that coreutils can change other than to help teach
people about the effect of locale settings.
--
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 146 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.