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

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

Thread Next
Anders Melchiorsen
October 20, 2011 03:22
[perl #101710] Decoding problem with s///i in perl 5.14
Message ID:
# New Ticket Created by  Anders Melchiorsen 
# Please include the string:  [perl #101710]
# in the subject line of all future correspondence about this issue. 
# <URL: >


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.


Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About