opensubscriber
   Find in this group all groups
 
Unknown more information…

a : activeperl@listserv.ActiveState.com 2 December 2005 • 11:27PM -0500

Re: Rgx fails at Unicode string using modifier /i
by Gisle Aas

REPLY TO AUTHOR
 
REPLY TO GROUP




"Axel Mock" <amock@sysk...> writes:

> we got a strange problem here, and it took quite a while to pin it
> down to the code snippet below.

This shorter test case:

  use Test::More tests => 2;
  utf8::upgrade($_ = "\xA9");
  ok(/\xA9/);
  ok(/\xA9/i);

> We are using ActiveState PERL 5.8.4 build 810.
> We've checked on Linux with PERL 5.8.5 : result is the same
>
> Run the little script below and check the output. Here we always get
> + and then a -.  Is this a bug in PERLs RE machine or are we doing
> something wrong??

This is a bug in perl that has been fixed¹ in the upcoming perl-5.8.8.
That means it will not be fixed for ActivePerl until build 816 is out.

The workaround I would suggest is to use:

   lc($content) =~ /\xA9\s*copyright/

instead of

   $content =~ /\xA9\s*Copyright/i

Regards,
Gisle Aas,
ActiveState


¹) http://public.activestate.com/cgi-bin/perlbrowse?patch=25095

_______________________________________________
ActivePerl mailing list
ActivePerl@list...
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.