Re: Re: Gobo Regexp and Unicode support.

Colin Paul Adams <colin-vnRo6g/[email protected]> Sun, 15 Jun 2008 07:03:24 +0100
Newsgroups gmane.comp.lang.eiffel.gobo.general
Message-ID <[email protected]>
>>>>> "Eric" == Eric Bezault <ericb-D6Qt/9opevxWk0Htik3J/[email protected]> writes:

    Eric> Would it be acceptable to use Ted's patch (with some
    Eric> protection when accessing the 256-bit pair of arrays) and
    Eric> make it clear in the doc of the regexp library that for
    Eric> case-insensitivity, \w, etc., only ASCII characters are

I guess that is a question to the whole of the list.

The current situation is that the library accepts UC_UTF8_STRING and
silenlty gives wrong results. Probably anything is better than this.

Maybe Ted's patch should be applied as it is - then a case-insensitive
search against a target string containing a non-Latin-1 code will
crash. I think this is better than silently giving wrong results.

    Eric> taken into account? Then those for whom this limitation is a
    Eric> problem would have to wait and use your fully unicode aware
    Eric> regexp library.

Having taken a look at the code, it may be that it can be adapted to
work with Unicode (the techniques I was planning to use already appear
to be present, and it seems the code was already re-written when put
into Gobo to use INTEGERs instead of CHARACTERs). 

I haven't actually written much at all (since February I have been
solely re-working the XPath library for the performance problem).

Adapting the current library though, will force it to depend upon the
string library. In my opinion that is perfectly reasonable (provided
the string library currently has no dependencies on the regexp library
- as far as I can tell from looking at the system.xace file of the
test/string cluster, this is indeed the case).
-- 
Colin Adams
Preston Lancashire