[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: sort (GNU textutils) 2.0
From: |
Bill Unruh |
Subject: |
Re: sort (GNU textutils) 2.0 |
Date: |
Tue, 2 Jan 2001 10:21:22 -0800 (PST) |
> Bill Unruh <address@hidden> wrote:
>
> | Sort appears to have been created with the -f option as the default on
> | later versions of Linux.
> | Since there is no way to switch this off however, this is not a great
> | default
>
> 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.
Yes, textutils-2.0
>
> 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).
I finally last night with experimentation discovered this. Certainly
surprising behaviour.
>
> Unset them, and then set LC_ALL to POSIX
I guess I will have to set a little shell script to do this.
>
> # 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.
Yes, this warning would be a great help. I kept looking at the man page
for any hint and also sort --help. I guess there is a little line hidden
in the info page (I do wish the info pages would go away and people kept
the man pages up to date.)
Thanks for the reply.
Bill Unruh