bug-textutils
[Top][All Lists]
Advanced

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

Re: Bug in sort?


From: Bob Proulx
Subject: Re: Bug in sort?
Date: Wed, 10 Jan 2001 11:07:24 -0700 (MST)

> I can not explain the behavior of the command "sort" as demonstrated in the
> following typescript:

Thank you for your report.  Jim has previously answered these reports
with something similar to the the following reply. 

Note that later versions of sort include the following warning.

*** WARNING ***
The locale specified by the environment affects sort order.
Set LC_ALL=C to get the traditional sort order that uses native byte values.

> You are using the version of sort that comes with textutils-2.0
> or newer and have reported a problem whereby it is sorting in
> some non-ASCII order.
> 
> That is due not to a bug in sort, but to the fact that you have
> set environment variables that direct sort to use improper locale-
> specific tables (you or your vendor have probably set environment
> variables like LC_ALL to en_US).
> 
> You should set LC_ALL to POSIX
> 
>   # If you use bash or some other Bourne-based shell,
>   export LC_ALL=POSIX
> 
>   # If you use a C-shell,
>   setenv LC_ALL POSIX
> 
> and then sort will work the way you expect.

I will note that Redhat seems to ship incorrect locale data as part of
en_US which is the default locale when users first install.  Therefore
setting LC_ALL to POSIX avoids the bad en_US data.

Other people have recompiled the textutils package from source
themselves and overwritten the installed files with their own source
built copy and have reported that everything operated correctly after
that.

Bob Proulx



reply via email to

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