This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regexec.c: utf8 doesn't match non-utf8 self
authorKarl Williamson <public@khwilliamson.com>
Wed, 20 Oct 2010 16:20:29 +0000 (10:20 -0600)
committerFather Chrysostomos <sprout@cpan.org>
Thu, 21 Oct 2010 12:56:30 +0000 (05:56 -0700)
commit634c83a2672252257e360eb1939b7ec762ef6308
treecb4ff7fdfa156a475b0cd9b5b9ace912cbc84318
parentd53d27f973b3f4329ad8aa1e1a11554c8e19c3e3
regexec.c: utf8 doesn't match non-utf8 self

Some regex patterns don't match a character with itself when the target
string is in utf8 and the pattern isn't, and the character is variant
under utf8.  (This means only Latin1-range characters in the pattern are
affected.)

The solution is to test for this case and use the utf8 representation of
the pattern character for the comparison.
regexec.c
t/re/pat.t