Re: Sorted indexes and (string<?) in Jade

Subject: Re: Sorted indexes and (string<?) in Jade
From: Toby Speight <Toby.Speight@xxxxxxxxxxxxxx>
Date: 15 Sep 1998 12:04:40 +0100
Heiko> Heiko Kirschke <URL:mailto:Heiko.Kirschke@xxxxxxx>

>> From: Toby Speight <Toby.Speight@xxxxxxxxxxxxxx>
>> Date: 15 Sep 1998 10:50:27 +0100
>>
>> Jade doesn't support the string<? primitive, nor any of the
>> related functions.  I was hoping to use this to sort an index
>> I've created, and so I'd be interested to hear what other people
>> use as a workaround.


0> In article <10165910010986@xxxxxxx>, Heiko wrote:

Heiko> My first idea was to work character by character on the
Heiko> strings to compare, using the (char-property numeric-equiv:
Heiko> ...)  [8.5.8.7, 8.5.8.1] for a numeric comparision between
Heiko> the `code' of both characters. Unfortuately, jade returns
Heiko> always #f on char-property.

It's not actually clear what 'numeric equivalent' means.  I understood
it to have the meaning it has in Unicode tables, so that the numeric
equivalent of "1" is 1 and that of the roman numeral "IX" character is
9.  You understood it as returning its position in the document
character set.  Does anyone have an accurate definition for this?



Heiko> So, I wrote a function which returns the ASCII code of a
Heiko> character (and ignoring the fact that jade uses Unicode
Heiko> internally)-: This I've used to do character-by-character
Heiko> comparisions; these character-by-character comparisions in
Heiko> turn I've used to define string comparisions.

Cool.  I'd like accented characters to be sorted in the usual manner;
I think I can take your code as a start on this (I only need to
implement the Latin-1 characters, and possibly the Welsh ones).

I think I'll do it the other way around, though: char comparisons will
need to be a special case of string comparisons.



>> I know it's a lot of work to build a collation engine (even simply
>> using the Unicode collation algorithm; more if it must support
>> (define-language) in the future), but does anyone have plans to
>> implement such a thing?

I should have added that I may volunteer (time permitting) if it's not
already being done, and as long as the fact of my company having a
Java source license doesn't cause difficulties (I haven't read the
Java collation code, but it's not easy to prove so).

-- 


 DSSSList info and archive:  http://www.mulberrytech.com/dsssl/dssslist


Current Thread
  • Sorted indexes and (string<?) in Jade
    • Toby Speight - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id FAA21400Tue, 15 Sep 1998 05:44:32 -0400 (EDT)
      • Heiko Kirschke - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id GAA21929Tue, 15 Sep 1998 06:11:04 -0400 (EDT)
        • Toby Speight - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id GAA23924Tue, 15 Sep 1998 06:56:37 -0400 (EDT) <=
          • Matthias Clasen - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id HAA24258Tue, 15 Sep 1998 07:15:03 -0400 (EDT)
      • Matthias Clasen - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id HAA24498Tue, 15 Sep 1998 07:25:09 -0400 (EDT)
        • Steve Tinney - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id KAA28239Tue, 15 Sep 1998 10:03:53 -0400 (EDT)
          • Toby Speight - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id KAA01725Tue, 15 Sep 1998 10:41:45 -0400 (EDT)