From: Jarkko Hietaniemi Date: Sun, 3 Feb 2002 18:33:53 +0000 (+0000) Subject: EBCDIC: more natification. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b08decb7b84e3a0b745312414baf1f50cbcbcaf4;p=p5sagit%2Fp5-mst-13.2.git EBCDIC: more natification. p4raw-id: //depot/perl@14540 --- diff --git a/regcomp.c b/regcomp.c index c238f4e..2283d10 100644 --- a/regcomp.c +++ b/regcomp.c @@ -4052,20 +4052,23 @@ S_regclass(pTHX_ RExC_state_t *pRExC_state) ANYOF_BITMAP_SET(ret, i); } if (value > 255 || UTF) { + UV prevnatvalue = NATIVE_TO_UNI(prevvalue); + UV natvalue = NATIVE_TO_UNI(value); + ANYOF_FLAGS(ret) |= ANYOF_UNICODE; - if (prevvalue < value) + if (prevnatvalue < natvalue) { /* what about > ? */ Perl_sv_catpvf(aTHX_ listsv, "%04"UVxf"\t%04"UVxf"\n", - (UV)prevvalue, (UV)value); - else if (prevvalue == value) { - Perl_sv_catpvf(aTHX_ listsv, "%04"UVxf"\n", - (UV)value); + prevnatvalue, natvalue); + } + else if (prevnatvalue == natvalue) { + Perl_sv_catpvf(aTHX_ listsv, "%04"UVxf"\n", natvalue); if (FOLD) { U8 tmpbuf [UTF8_MAXLEN+1]; U8 foldbuf[UTF8_MAXLEN_FOLD+1]; STRLEN foldlen; UV f; - uvchr_to_utf8(tmpbuf, NATIVE_TO_UNI(value)); + uvchr_to_utf8(tmpbuf, natvalue); to_utf8_fold(tmpbuf, foldbuf, &foldlen); f = UNI_TO_NATIVE(utf8_to_uvchr(foldbuf, 0));