This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix \xa0 matching both [\s] [\S], et.al.
[perl5.git] / regexec.c
index ca88d9f..be0feeb 100644 (file)
--- a/regexec.c
+++ b/regexec.c
@@ -6336,6 +6336,12 @@ S_reginclass(pTHX_ const regexp * const prog, register const regnode * const n,
     if (c < 256) {
        if (ANYOF_BITMAP_TEST(n, c))
            match = TRUE;
+       else if (flags & ANYOF_NON_UTF8_LATIN1_ALL
+               && ! utf8_target
+               && ! isASCII(c))
+       {
+           match = TRUE;
+       }
 
        else if (flags & ANYOF_LOCALE) {
            PL_reg_flags |= RF_tainted;