summaryrefslogtreecommitdiff
path: root/regcomp.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-01-05 06:44:27 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-01-05 06:44:27 +0000
commitfd400ab9029cac48f6054d57b59a99ec1c5d5e1e (patch)
tree48c21ddf1f8c4aa55b33343393a2bf6d75524a0c /regcomp.c
parentf5cf745e299cac34ef186d2d2d056e876998ccb2 (diff)
downloadperl-fd400ab9029cac48f6054d57b59a99ec1c5d5e1e.tar.gz
UTF-8 cleanup.
p4raw-id: //depot/perl@8328
Diffstat (limited to 'regcomp.c')
-rw-r--r--regcomp.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/regcomp.c b/regcomp.c
index c39405ef96..19d8e8ee77 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -2925,7 +2925,7 @@ tryagain:
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;
@@ -2945,6 +2945,8 @@ tryagain:
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;
@@ -2956,6 +2958,8 @@ tryagain:
}
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;