develooper Front page | perl.perl5.porters | Postings from February 2012

Re: [perl #111174] /(?i:...)/ loses passed in charset

Thread Previous | Thread Next
From:
Karl Williamson
Date:
February 20, 2012 10:42
Subject:
Re: [perl #111174] /(?i:...)/ loses passed in charset
Message ID:
4F42941B.20609@khwilliamson.com
On 02/20/2012 11:21 AM, karl williamson (via RT) wrote:

Here is a patch for this bug, that was just spotted by Yves.  This bug 
has existed in all of 5.14.

Should this go into 5.16?


> -----------------------------------------------------------------
> Setting flags in a regular expression using the (?foo:...) notation
> loses any passed in character set.  for example through the -E flag.
> So,
>       perl -E ' "\xe0" =~ /(?i:\w)/'
> fails because the ?i: destroys the memory that the -E was used, which
> should have forced Unicode semantics on the Latin1 character \xe0.
>
> Spotted by Yves Orton
> -----------------------------------------------------------------


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About