GNU bug report logs - #6791
locale sort ordering confusion

Previous Next

Package: coreutils;

Reported by: "George Thomas Irimben (georgeti)" <georgeti <at> cisco.com>

Date: Tue, 3 Aug 2010 20:33:01 UTC

Severity: normal

Tags: moreinfo, notabug

Merged with 6790

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: "George Thomas Irimben (georgeti)" <georgeti <at> cisco.com>
Cc: 6791 <at> debbugs.gnu.org
Subject: bug#6791: Problem(bug?) with basic sort command in Linux
Date: Tue, 03 Aug 2010 15:10:25 -0600
[Message part 1 (text/plain, inline)]
merge 6790 6791
tag 6790 + notabug
close 6790
thanks

On 08/03/2010 02:26 PM, George Thomas Irimben (georgeti) wrote:
> Hi,
> Setting LC_ALL to C fixed the issue. 
> But before setting this to C, with same .cshrc file, Unix didn't give me
> a problem.

That just means that you have a different default locale on your Unix
box than you do on the box where you encountered the difference.

> 
> Does it mean my shell script which has this sort command will not work
> for others unless they set their LC_ALL?
> Should I set this to C in my script itself? 

In general, it is a good idea, if you don't want locale differences to
impact the behavior of your script.

This is not a bug in sort, and it is a FAQ:
http://www.gnu.org/software/coreutils/faq/#Sort-does-not-sort-in-normal-order_0021

-- 
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 15 years and 8 days ago.

Previous Next


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