[Top][All Lists]

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

Re: sort behavior - Ubuntu problem?

From: Kevin Scannell
Subject: Re: sort behavior - Ubuntu problem?
Date: Wed, 24 Jan 2007 21:06:05 -0600

On 1/24/07, The Wanderer <address@hidden> wrote:
Paul Eggert wrote:

> "Kevin Scannell" <address@hidden> writes:
>> Can anyone with a Debian-like distribution reproduce the strange
>> sort order I'm seeing?
>> a
>> á
>> áa
>> aá
>> az
>> áz
>> ázzzza
>> azzzzá
> I can't, with Debian stable x86.  I get the order you expect.

I can, with a mix of Debian unstable and testing, also x86.

Paul, Wanderer,
 I'm grateful for the tests.  At least now I know I'm not totally
crazy.  I did a bit more testing this afternoon.
  First, I found the same problem with later versions of coreutils,
including 6.7.  Then, since I suspected a locale definition bug, I
copied the locale source file that defines LC_COLLATE
(/usr/share/i18n/locales/iso14651_t1) from my Gentoo box where sort
works, to the broken Ubuntu box and reran "locale-gen".   The were
quite a few differences between the files so I was hopeful that this
might do the trick, but unfortunately it didn't help.

  One thing I can say for sure is that strcoll is broken.   I wrote a
10 line C program that sets up the utf-8 strings "aá" (0x61,0xc3,0xa1)
and "áa" (0xc3,0xa1,0x61) explicitly and then outputs the return value
of strcoll.  It definitely thinks "áa" should be first, which is bad.

Browsing around the "sort" source code, strcoll seems to be the heart
of the matter (by way of xmemcoll and memcoll) - please correct me if
I'm wrong.

  Wanderer, could you tell me what version of glibc you have?  Here's mine:
ii  libc6-dev      2.4-1ubuntu12  GNU C Library: Development Libraries and Hea

Thanks again for the help - I'll try and sort it out with the glibc
developers, or maybe by looking carefully at the recent Debian/Ubuntu


reply via email to

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