summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--regcomp.c9
-rw-r--r--t/re/re_tests1
2 files changed, 10 insertions, 0 deletions
diff --git a/regcomp.c b/regcomp.c
index 2a8ce8e867..0841f172e5 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -12687,12 +12687,21 @@ parseit:
}
else
#endif /* Not isascii(); just use the hard-coded definition for it */
+ {
_invlist_union_maybe_complement_2nd(
posixes,
PL_ASCII,
cBOOL(namedclass % 2), /* Complement if odd
(NASCII) */
&posixes);
+
+ /* The code points 128-255 added above will be
+ * subtracted out below under /d, so the flag needs to
+ * be set */
+ if (namedclass == ANYOF_NASCII && DEPENDS_SEMANTICS) {
+ ANYOF_FLAGS(ret) |= ANYOF_NON_UTF8_LATIN1_ALL;
+ }
+ }
}
else { /* Garden variety class */
diff --git a/t/re/re_tests b/t/re/re_tests
index 4d89e69e70..0af345ae3e 100644
--- a/t/re/re_tests
+++ b/t/re/re_tests
@@ -638,6 +638,7 @@ $(?<=^(a)) a y $1 a
([[:^alpha:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 01
((?a)[[:^alnum:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 __-- ${nulnul}${ffff}
([[:^ascii:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 ${ffff}
+([:[:^ascii:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 ${ffff} RT #120799
([[:^cntrl:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 ABcd01Xy__--
([[:^digit:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 ABcd
([[:^lower:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 AB