bug-textutils
[Top][All Lists]
Advanced

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

Re: on the behaviour of "sort"


From: Heinz Andernach
Subject: Re: on the behaviour of "sort"
Date: Sat, 3 Mar 2001 14:18:10 -0600

Dear Bob,

many thanks for forwarding Jim's email on a suspected bug in sort that turned
out to be easily remedied with a statement

export LC_ALL=POSIX         or   setenv LC_ALL POSIX

I have tried this and it works now as expected.

Regards,

Heinz Andernach                         tel: +52-4-740-2306 (home)
Depto. de Astronomia, Univ. Guanajuato  tel: +52-4-732-9548 or 732-9607
Apartado Postal 144                     FAX: +52-4-732-0253 
Guanajuato, C.P. 36000, GTO, Mexico     Email: address@hidden

> Date: Fri, 2 Mar 2001 22:01:53 -0700
> From: Bob Proulx <address@hidden>
> To: Heinz Andernach <address@hidden>
> Cc: address@hidden
> Subject: Re: on the behaviour of "sort"
> 
> > with surprise I noticed that the "sort" command under Linux RedHat 7
> > does not seem to have the same functionality as it used to have
> > e.g. under SUN solaris or even under Linux RedHat 6.2.  I noticed
> > the problem when trying to sort the following table
> [...]
> 
> Jim has previously answered these reports with the following mail.
> Note that some vendors set those language variables for you without
> you being aware of them.
> 
> Bob
> 
> 
> Jim Meyering writes:
> 
> 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 LANG, LC_ALL, or LANGUAGE to en_US).
> 
> Unset them, and then 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 sort will then work the way you expect.
> -----------
> 
> BTW, in recent textutils test releases, sort --help output
> includes this:
> 
>   *** WARNING ***
>   This version of sort honors the locale settings in your environment.
>   For example, if you set one of the LANG or LC_ALL environment variables
>   to `en_US', then sort will work very differently than most people expect.
>   If that's not what you want, then set LC_ALL to POSIX in your environment.



reply via email to

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