diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-01-05 06:44:27 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-01-05 06:44:27 +0000 |
commit | fd400ab9029cac48f6054d57b59a99ec1c5d5e1e (patch) | |
tree | 48c21ddf1f8c4aa55b33343393a2bf6d75524a0c /regcomp.c | |
parent | f5cf745e299cac34ef186d2d2d056e876998ccb2 (diff) | |
download | perl-fd400ab9029cac48f6054d57b59a99ec1c5d5e1e.tar.gz |
UTF-8 cleanup.
p4raw-id: //depot/perl@8328
Diffstat (limited to 'regcomp.c')
-rw-r--r-- | regcomp.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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; |