Note that per spec, \x w/o brackets should eat as many characters as
look like hex digits. If that means the code point is outside the
range of valid Unicode, then it should throw an error.

On Tuesday, May 25, 2010, Moritz Lenz <mor...@faui2k3.org> wrote:
>
>
> Am 24.05.2010 08:40, schrieb Aaron Sherman:
>
> I came up with these tests which I though should work:
>
> ok("π" ~~ /<[π]>/, "π as a character class");
> ok("π" ~~ /<[\x03c0]>/, "π as a character class (hex)");
> ok("π" ~~ /<[\x0391 .. \x03c9]>/, "π in a character class range");
> ok("π" ~~ /\w/, "π as a word character");
>
> Of those, only the first one actually did work. The others all fail.
>
>
> The last one actually works for me.
> Please make sure that you have the 'icu' library installed, and that parrot's 
> Configure.pl properly picks it up. Only then will you get partially sane 
> Unicode handling.
>
>
> Am I misunderstanding how these constructs should work?
>
>
> nope; it seems that Rakudo expects only two characters after the \x escape 
> sequence (which is a bug):
>
> 10:53 <@moritz_> rakudo: say 'c' ~~ /<[\x03c0]>/
> 10:53 <+p6eval> rakudo 10a321: OUTPUT«c␤»
> 10:55 <@moritz_> rakudo: say '0' ~~ /<[\x03c0]>/
> 10:55 <+p6eval> rakudo 10a321: OUTPUT«0␤»
>
> Cheers,
> Moritz
>

-- 
Mark J. Reed <markjr...@gmail.com>

Reply via email to