Re: Gobo Regexp and Unicode support.
"Ted" <kkkkg999-/[email protected]> Sat, 14 Jun 2008 06:31:19 -0000
| Newsgroups | gmane.comp.lang.eiffel.gobo.general |
|---|---|
| Message-ID | <[email protected]> |
--- In [email protected], Colin Paul Adams <colin@...> wrote: > > >>>>> "Ted" == Ted <kkkkg999@...> writes: > > >> > Have you tried to match ".*a.*" against a string of 256 > >> successive > codepoints (not including ASCII")? > > Ted> Yes, I tried the following as subjects: 1) -- > Ted> 一个例子 2) -- > Ted> 另一个例子子a > > That answer looks contradictory to me. > A string of 256 successive code points would be something like: > > 丠両丢....伟 Sorry for my misunderstanding. Look at the following code: make is -- Run application. local pattern, subject: UC_UTF8_STRING i, max: INTEGER_32 matcher: RX_PCRE_MATCHER do from i := 0x442A max := i + 255 create subject.make (256) until i > max loop subject.append_unicode_character (create {UC_CHARACTER}.make_from_code (i)) i := i + 1 end create pattern.make_from_string (".*a.*") create matcher.make matcher.compile (pattern) print (matcher.matches (subject)) io.put_new_line end The result is "False" with patched Gobo Regexp. But using UC_STRING, with original Gobo Regexp, the result is "False" too. Ted