bug-textutils
[Top][All Lists]
Advanced

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

sort folds case depending on LANG environment variable


From: Edward Avis
Subject: sort folds case depending on LANG environment variable
Date: Sun, 15 Oct 2000 18:46:01 +0100 (BST)

% echo -e "a\nB" | LANG= sort
B
a
% echo -e "a\nB" | LANG=en sort
B
a
% echo -e "a\nB" | LANG=en_US sort
a
B                                                                               
                                              
% sort --version
sort (GNU textutils) 2.0e

% uname -a
Linux texel26 2.2.16-3smp #1 SMP Mon Jun 19 19:00:35 EDT 2000 i686 unknown
[Red Hat 6.2]

This is pretty serious since desktop environments like GNOME tend to set
$LANG to something along these lines.  The problem seems to occur
whenever you have language_dialect; so 'fr' is okay, but 'fr_FR'
breaks.  This behaviour is not mentioned in the manual page or the info
documentation, as far as I can tell.

I'm not really sure why sort is looking at $LANG at all - it's not a
tool which users expect to be locale-aware.  Surely it should just sort
8-bit characters the way it always has, unless the user specifically
asks for something else.  Also, the sorting order has become
inconsistent with other programs like GNU ls.

-- 
Ed Avis
address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]