}
/* If the bitmap didn't (or couldn't) match, and something outside the
- * bitmap could match, try that */
+ * bitmap could match, try that. Locale nodes specifiy completely the
+ * behavior of code points in the bit map (otherwise, a utf8 target would
+ * cause them to be treated as Unicode and not locale), except XXX in
+ * the very unlikely event when this node is a synthetic start class, which
+ * could be a combination of locale and non-locale nodes */
if (!match) {
if (utf8_target && (flags & ANYOF_UNICODE_ALL) && c >= 256) {
match = TRUE; /* Everything above 255 matches */
}
else if ((flags & ANYOF_NONBITMAP_NON_UTF8
- || (utf8_target && flags & ANYOF_UTF8)))
+ || (utf8_target && flags & ANYOF_UTF8
+ && (c >=256 || ! (flags & ANYOF_LOCALE)))))
{
AV *av;
SV * const sw = regclass_swash(prog, n, TRUE, 0, (SV**)&av);
$testcases{'[:word:]'} = $testcases{'\w'};
# For each possible character set...
-foreach my $charset ("a", "d", "u") {
+foreach my $charset ("a", "d", "l", "u") {
# And in utf8 or not
foreach my $upgrade ("", 'utf8::upgrade($a); ') {