"Chan Ting" <[EMAIL PROTECTED]> wrote:
> I found that there is the bug in standard linux sort program (textutils rpm)
> version 2.0.11-7 which is included in redhat 7.1, then I update it to 2.0.14-2
> but the problem still remain. Then I downgrade the rpm to textutils-2.0a-2, it
> solved the problem.
> here is the sample data file:
> nsync_pop
> nsynclp
> nsync_pop_
> abcd
> nsyncrulez
> abc
> abc_d
> abc_
> result after sorting with textutils rpm version 2.0.14-2 :
...

Thanks for the report, but that's not a bug.

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.

_______________________________________________
Bug-textutils mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-textutils

Reply via email to