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

Reply via email to