*
**** Alterations to Henry's code are...
****
- **** Copyright (c) 1991-2000, Larry Wall
+ **** Copyright (c) 1991-2001, Larry Wall
****
**** You may distribute under the terms of either the GNU General Public
**** License or the Artistic License, as specified in the README file.
if (compat)
ANYOF_BITMAP_SET(data->start_class, uc);
data->start_class->flags &= ~ANYOF_EOS;
+ if (uc < 0x100)
+ data->start_class->flags &= ~ANYOF_UNICODE_ALL;
}
else if (flags & SCF_DO_STCLASS_OR) {
/* false positive possible if the class is case-folded */
if (uc < 0x100)
- ANYOF_BITMAP_SET(data->start_class, uc);
+ ANYOF_BITMAP_SET(data->start_class, uc);
+ else
+ data->start_class->flags |= ANYOF_UNICODE_ALL;
data->start_class->flags &= ~ANYOF_EOS;
cl_and(data->start_class, &and_with);
}
break;
default:
normal_default:
- if ((*p & 0xc0) == 0xc0 && UTF) {
+ if (UTF8_IS_START(*p) && UTF) {
ender = utf8_to_uv((U8*)p, RExC_end - p,
&numlen, 0);
p += numlen;
if (ISMULT2(p)) { /* Back off on ?+*. */
if (len)
p = oldp;
+ /* ender is a Unicode value so it can be > 0xff --
+ * in other words, do not use UTF8_IS_CONTINUED(). */
else if (ender >= 0x80 && UTF) {
reguni(pRExC_state, ender, s, &numlen);
s += numlen;
}
break;
}
+ /* ender is a Unicode value so it can be > 0xff --
+ * in other words, do not use UTF8_IS_CONTINUED(). */
if (ender >= 0x80 && UTF) {
reguni(pRExC_state, ender, s, &numlen);
s += numlen;