develooper Front page | perl.perl5.porters | Postings from October 2011

[perl #101710] Decoding problem with s///i in perl 5.14

Thread Next
From:
Anders Melchiorsen
Date:
October 20, 2011 03:22
Subject:
[perl #101710] Decoding problem with s///i in perl 5.14
Message ID:
rt-3.6.HEAD-31297-1319035051-329.101710-75-0@perl.org
# New Ticket Created by  Anders Melchiorsen 
# Please include the string:  [perl #101710]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=101710 >


Hello.

I have noticed this unexpected behaviour in perl 5.14.2:

  perl -e 'use 5.012; my $x="br\x{f8}ndby"; $x =~ s/b/X/gi; say $x;'

outputs "Xrøndby" (in a latin1 terminal) -- that is, the last "b" is not replaced with an "X".

I have found that it works as expected in 5.12.2 as well as the blead branch. I do not know when the problem appeared, but I bisected the fix to commit 0a185c45d11435c3182b92d9373bd28ab7c386b2.

The commit message seems to consider this an optimization rather than a bugfix. So I wanted to make you aware of this, and suggest inclusion on the 5.14 branch.


Thanks,
Anders.



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