# define isUPPER_A(c) cBOOL(FITS_IN_8_BITS(c) && (PL_charclass[(U8) NATIVE_TO_UNI(c)] & _CC_UPPER_A))
# define isWORDCHAR_A(c) cBOOL(FITS_IN_8_BITS(c) && (PL_charclass[(U8) NATIVE_TO_UNI(c)] & _CC_WORDCHAR_A))
# define isXDIGIT_A(c) cBOOL(FITS_IN_8_BITS(c) && (PL_charclass[(U8) NATIVE_TO_UNI(c)] & _CC_XDIGIT_A))
-# define _NONLATIN1_FOLD_CLOSURE_ONLY_FOR_USE_BY_REGCOMP_DOT_C(c) ((! cBOOL(FITS_IN_8_BITS(c))) || (PL_charclass[(U8) NATIVE_TO_UNI(c)] & _CC_NONLATIN1_FOLD))
+# define _HAS_NONLATIN1_FOLD_CLOSURE_ONLY_FOR_USE_BY_REGCOMP_DOT_C_AND_REGEXEC_DOT_C(c) ((! cBOOL(FITS_IN_8_BITS(c))) || (PL_charclass[(U8) NATIVE_TO_UNI(c)] & _CC_NONLATIN1_FOLD))
#else /* No perl.h. */
# define isOCTAL_A(c) ((c) >= '0' && (c) <= '9')
# ifdef EBCDIC
if (UNI_SEMANTICS && value == LATIN_SMALL_LETTER_SHARP_S) {
ANYOF_FLAGS(node) |= ANYOF_NONBITMAP_NON_UTF8;
}
- else if (_NONLATIN1_FOLD_CLOSURE_ONLY_FOR_USE_BY_REGCOMP_DOT_C(value)
+ else if (_HAS_NONLATIN1_FOLD_CLOSURE_ONLY_FOR_USE_BY_REGCOMP_DOT_C_AND_REGEXEC_DOT_C(value)
|| (! UNI_SEMANTICS
&& ! isASCII(value)
&& PL_fold_latin1[value] != value))
/* If the bitmap didn't (or couldn't) match, and something outside the
* bitmap could match, try that */
if (!match) {
- if (utf8_target && (flags & ANYOF_UNICODE_ALL) && c >= 256) {
- match = TRUE;
+ if (utf8_target && (flags & ANYOF_UNICODE_ALL)) {
+ if (c >= 256
+ || ((flags & ANYOF_FOLD) /* Latin1 1 that has a non-Latin1 fold
+ should match */
+ && _HAS_NONLATIN1_FOLD_CLOSURE_ONLY_FOR_USE_BY_REGCOMP_DOT_C_AND_REGEXEC_DOT_C(c)))
+ {
+ match = TRUE;
+ }
}
- else if ((flags & ANYOF_NONBITMAP_NON_UTF8)
- || (utf8_target && flags & ANYOF_UTF8))
+ if (!match && ((flags & ANYOF_NONBITMAP_NON_UTF8)
+ || (utf8_target && flags & ANYOF_UTF8)))
{
AV *av;
SV * const sw = regclass_swash(prog, n, TRUE, 0, (SV**)&av);