From: Jarkko Hietaniemi Date: Wed, 20 Feb 2002 22:15:23 +0000 (+0000) Subject: In EBCDIC the UNI_TO_NATIVE() macro evaluates its argument X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=36fec512d0f14b1b52f266589c60192b619fa2ff;p=p5sagit%2Fp5-mst-13.2.git In EBCDIC the UNI_TO_NATIVE() macro evaluates its argument twice, causing the loop to skip every other character. p4raw-id: //depot/perl@14800 --- diff --git a/utf8.c b/utf8.c index 7dbb71f..6fc4acd 100644 --- a/utf8.c +++ b/utf8.c @@ -1341,8 +1341,10 @@ Perl_to_utf8_case(pTHX_ U8 *p, U8* ustrp, STRLEN *lenp, SV **swashp, char *norma } } else { - while (t < tend) - d = uvchr_to_utf8(d, UNI_TO_NATIVE(*t++)); + while (t < tend) { + d = uvchr_to_utf8(d, UNI_TO_NATIVE(*t)); + t++; + } } len = d - tmpbuf; Copy(tmpbuf, ustrp, len, U8);