[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: sort folds case depending on LANG environment variable
From: |
Bob Proulx |
Subject: |
Re: sort folds case depending on LANG environment variable |
Date: |
Sun, 15 Oct 2000 14:14:15 -0600 (MDT) |
> [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 has become a common problem with respect to Red Hat systems. But
GNU sort itself has never had this problem. It was introduced by Red
Hat somehow with some, but not all, of their distributions. If you
compile the GNU source yourself you should have correct behavior.
Jim Meyering <address@hidden> previously wrote:
: I suggest you use the latest test release:
:
: ftp://alpha.gnu.org/gnu/fetish/textutils-2.0g.tar.gz
> This behaviour is not mentioned in the manual page or the info
> documentation, as far as I can tell.
Hmm... I have to agree with you there. The documentation does imply
that locale specific comparisons are used, however. Here is what it
says:
: A pair of lines is compared as follows: if any key fields have been
: specified, `sort' compares each pair of fields, in the order specified
: on the command line, according to the associated ordering options,
: until a difference is found or no fields are left. Unless otherwise
: specified, all comparisons use the character collating sequence
: specified by the `LC_COLLATE' locale.
I am not sure how someone makes the connection between LC_COLLATE and
LC_ALL and LANG but there is the implication that locales are used
when comparing lines.
> 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.
Actually users _are_ expecting it to be locale aware. For one POSIX
requires it. For another the Internet is a global entity and has
moved away from US-ASCII only software. Non-English speakers expect
sorting to use the rules for their language.
Compile and installing the latest GNU textutils software and I am sure
you will find the problem resolved.
Bob