Re: sort

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

 



On Thu, 2003-07-10 at 08:50, Tim Waugh wrote:
> On Thu, Jul 10, 2003 at 10:47:00AM -0500, Bill Gradwohl wrote:
> 
> > I have a file full of random IP addresses, 1 per line. When I sort
> > it with no options, I don't get a pure ASCII sort.
> 
> You do in the C locale.  In any other locale, the locale's sorting
> rules apply.
> 
> For pure ASCII sorting, you need to do: LC_COLLATE=C sort

Does anyone know where the reasoning behind the strange collating
behavior in the en_US.UTF-8 locale?  No matter how I pre-sort the IP
list, en_US.UTF-8 collating still wants to put the "128.*" IP address
between two "12.*" ones.  This is even true on Solaris, so the problem
appears to be with the en_US.UTF-8 collation table, not the OS or its
collation code.

I thought the whole point of having a locale handle collation is so
things are sorted in the way that seems most natural to the people who
live there.  Apparently I live in "C", not California.

Tom




[Index of Archives]     [Fedora Users]     [Centos Users]     [Kernel Development]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Red Hat Phoebe Beta]     [Yosemite Forum]     [Fedora Discussion]     [Gimp]     [Stuff]     [Yosemite News]

  Powered by Linux