Re: Re: Gobo Regexp and Unicode support.
Eric Bezault <ericb-D6Qt/9opevxWk0Htik3J/[email protected]> Sun, 15 Jun 2008 00:17:21 +0200
| Newsgroups | gmane.comp.lang.eiffel.gobo.general |
|---|---|
| Message-ID | <[email protected]> |
Colin Paul Adams wrote: >>>>>> "Ted" == Ted <kkkkg999-/[email protected]> writes: > > Ted> The result is "False" with patched Gobo Regexp. But using > Ted> UC_STRING, with original Gobo Regexp, the result is "False" > Ted> too. > > Then it looks like your patch has something to be said for it. > > But not entirely. I took a look at the code, and there is a hard-code > 256-bit pair of arrays for case translation, so a case-insensitive > match will definitely crash on Unicode (in any case, that method of > doing case-insensitive matches is wrong. For instance, the three strings ESSEN, > essen and eßen should all compare equal for case insensitive > matches.) Would it be acceptable to use Ted's patch (with some protection when accessing the 256-bit pair of arrays) and make it clear in the doc of the regexp library that for case-insensitivity, \w, etc., only ASCII characters are taken into account? Then those for whom this limitation is a problem would have to wait and use your fully unicode aware regexp library. -- Eric Bezault mailto:ericb-D6Qt/9opevxWk0Htik3J/[email protected] http://www.gobosoft.com