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> &#19968;&#20010;&#20363;&#23376; 2) --
>     Ted> &#21478;&#19968;&#20010;&#20363;&#23376;&#23376;a
> 
> That answer looks contradictory to me.
> A string of 256 successive code points would be something like:
> 
> &#20000;&#20001;&#20002;....&#20255;

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