From: Jarkko Hietaniemi Date: Tue, 19 Mar 2002 04:00:38 +0000 (+0000) Subject: UTF-8 walk errors that become visible in EBCDIC. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0f0076b444962edb4e038dfed2a525991aa66519;p=p5sagit%2Fp5-mst-13.2.git UTF-8 walk errors that become visible in EBCDIC. p4raw-id: //depot/perl@15311 --- diff --git a/regexec.c b/regexec.c index 59f1be1..e676568 100644 --- a/regexec.c +++ b/regexec.c @@ -2423,7 +2423,7 @@ S_regmatch(pTHX_ regnode *prog) sayNO_ANYOF; if (locinput >= PL_regeol) sayNO; - locinput += inclasslen ? inclasslen : 1; + locinput += inclasslen ? inclasslen : UTF8SKIP(locinput); nextchr = UCHARAT(locinput); break; } @@ -4240,7 +4240,7 @@ S_reginclass(pTHX_ register regnode *n, register U8* p, STRLEN* lenp, register b c = do_utf8 ? utf8_to_uvchr(p, &len) : *p; - plen = lenp ? *lenp : UNISKIP(c); + plen = lenp ? *lenp : UNISKIP(NATIVE_TO_UNI(c)); if (do_utf8 || (flags & ANYOF_UNICODE)) { if (lenp) *lenp = 0; @@ -4285,7 +4285,7 @@ S_reginclass(pTHX_ register regnode *n, register U8* p, STRLEN* lenp, register b } } if (match && lenp && *lenp == 0) - *lenp = UNISKIP(c); + *lenp = UNISKIP(NATIVE_TO_UNI(c)); } if (!match && c < 256) { if (ANYOF_BITMAP_TEST(n, c))