[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Mon, 26 Aug 2002 10:58:50 -0600
David Gregg <address@hidden> [2002-08-26 14:23:39 +0100]:
> I'm using:
> sort (textutils) 2.0.21
> In other words, sort thinks that this is a correct sorting of the file.
> It is not. The correct output should be:
> If I had typed "sort -d bob" (-d specifies to ignore all characters except
> alphanumeric ones) then this would be the correct output.
Use the 'locale' command to print out what sorting order you have
configured in your environment. If it does not say "C" or "POSIX"
then you have configured a non-standard sorting order. In which case
it is not a bug in sort but behavior which is specifically required.
Most generally reported is that 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,
# 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.
- sort, David Gregg, 2002/08/26