Re: Re: Gobo Regexp and Unicode support.

Colin Paul Adams <colin-vnRo6g/[email protected]> Fri, 13 Jun 2008 14:43:54 +0100
Newsgroups gmane.comp.lang.eiffel.gobo.general
Message-ID <[email protected]>
>>>>> "Ted" == Ted  <kkkkg999-/[email protected]> writes:

    Ted> The patch basically does three things: 1. Makes that piece of
    Ted> code treats a Unicode point code as a character, rather than
    Ted> a code less than 255 (CHARACTER_8), which could be a byte of
    Ted> UTF8, not representing a Unicode character.

I don't understand you.
Do you mean you are translating both the regular expression and the
data to the UTF-8 byte representations?

This is a trick Franck Arnaud suggested, but it doesn't always
work. For instance, . in the regular expression will now match one
byte, not one character.

For example, try matching the regular expression "a.a" against
"aHa". It will match - correctly. Now substitute any single Chinese
ideogram for H. It will not match - but it should.

Conversely, try the regular expression "a..+a" against the same two
data strings. In thge first case it will not match (correctly). In the
second case it will match (incorrectly).

There are many more problems. For instance, case insensitive matching.
-- 
Colin Adams
Preston Lancashire