+++ This bug was initially created as a clone of Bug #801739 +++
$ perl -e 'use 5.012; my $x="br\x{f8}ndby"; $x =~ s/b/X/gi; say $x;'
Xr�ndby
This is regression introduced in Perl 5.14. perl-5.14.2-197.fc16.x86_64 is affected.
Reported to upstream <https://rt.perl.org/rt3/Public/Bug/Display.html?id=101710> a and fixed in development tree by commit:
commit bbdd8bad57f8d77a4e6c3725a49d4d3589efedd7
Author: Karl Williamson <public>
Date: Tue Nov 1 17:57:15 2011 -0600
PATCH: [perl #101710] Regression with /i, latin1 chars.
The root cause of this bug is that it was assuming that a string was in
utf8 when it wasn't, and so was thinking that a byte was a starter byte
that wasn't, so was skipping ahead based on that starter byte.
-------
RHEL-7 affected (perl-5.14.2-190.el7.x86_64).