lout-users
[Top][All Lists]
Advanced

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

Problems with collation (Was: Locale-specific sorting)


From: Valeriy E. Ushakov
Subject: Problems with collation (Was: Locale-specific sorting)
Date: Sat, 14 Mar 1998 14:27:00 +0300

On Sat, Mar 14, 1998 at 12:35:38AM +0100, Michael Piotrowski wrote:

> The problem I experienced was that lout.li got not sorted the way that Lout 
> expected it to be sorted, because my locale defines all non-alphanumeric 
> characters to be sorted after the alphanumeric characters.
> 
> If LANG=C, I get the following result:
> 
> 1&284.test.1    0       00001   0       1       test
> 17&681.test.1   0       00019   2121    171     test
>  
> Whereas if LANG=de_DE.iso88591, I get the following result:
> 
> 17&681.test.1   0       00019   2121    171     test
> 1&284.test.1    0       00001   0       1       test
> 
> Lout obviously expects the first result, and consequently failed to
> resolve the references.

You are running 3.11, right?

I have to confess that this is my fault and I apologize for causing
you troubles.

In the collation patch that I've sent to Jeff and that was integrated
into 3.11 I've overlooked one place that was to be conditionalized on
collation.  As a consequece databases are sorted in collation order
(strcoll) but are binary-searched with a different order (strcmp).
This problem went unnoticed since in my own locale the ASCII part
(intentionally) goes strictly in ASCII order.  And no one seems tested
the patch with other locales when I posted it in July 1997. :-(

I discovered this bug when I'd built collating lout on NT.  I have
posted the patch for this bug against 3.11 to the list along with my
announcement of the availability of win32 lout binaries.

I have put the patch to

    ftp://ftp.ptc.spbu.ru/pub/unix/text/lout/lout.3.11-Collation.pch

Since the patch is very small, for your convenience I'm attaching it
to my message.

Again, sorry.

If you have any more critique/comments/suggestions with regard to
collation in lout I'll be glad discuss them.

Hope it helps (if not - let me know).

SY, Uwe
-- 
address@hidden                         |       Zu Grunde kommen
http://www.ptc.spbu.ru/~uwe/            |       Ist zu Grunde gehen

Attachment: lout.3.11-Collation.pch
Description: Text document


reply via email to

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