[Top][All Lists]

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

Re: sort 2.0 bug

From: Bob Proulx
Subject: Re: sort 2.0 bug
Date: Thu, 25 Jul 2002 00:48:32 -0600
User-agent: Mutt/1.4i

> I have found an inconsistency between the way your sort works on linux and
> the way it works on windows. On linux it ignores non [a-zA-Z0-9] characters
> so "the42" comes after "the,3" but it comes before "the,5". But on windows
> it does not ignore them so "the42" comes last. See examples below.

You have found a common ailment.  As you can see the spaces and
punctuation are ignored and case is ignored in the sort.  Your vendor
set LANG for you to en_US because they think you like it that way.  If
you disagree then you might consider filing a bug report with them.

Here is a standard reply. 


Please check out the FAQ section on sort.


This is due to the fact that you or your vendor have set environment
variables that direct the program to use locale specific sorting
tables which do not sort as you expect.  You or your vendor have
probably set environment variables like LANG, LC_ALL, or LANG to
en_US.  Use the 'locale' program to display your current settings.

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 it will then work the way you expect because it will use a
different set of tables.

See the standards documentation for more information on the locale
variables with regards to sort.


reply via email to

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