X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=utf8.c;h=f900724ab05df4eb6643d400218a5880ef3dcff2;hb=1bb908c3a4ad348fff25b9046b4be74565cde673;hp=d73809c1640ba4ecbb66a04f13d10d2bab402a6f;hpb=e6b2e7559f25acecc651c2f0d304b65728937d82;p=p5sagit%2Fp5-mst-13.2.git diff --git a/utf8.c b/utf8.c index d73809c..f900724 100644 --- a/utf8.c +++ b/utf8.c @@ -1220,6 +1220,8 @@ Perl_to_utf8_case(pTHX_ U8 *p, U8* ustrp, STRLEN *lenp, SV **swashp,char *normal HE *he; uv = utf8_to_uvchr(p, 0); + if (uv <= 0xff) + uv = NATIVE_TO_UTF(uv); if ((hv = get_hv(special, FALSE)) && (keysv = sv_2mortal(Perl_newSVpvf(aTHX_ "%04"UVXf, uv))) && @@ -1230,6 +1232,7 @@ Perl_to_utf8_case(pTHX_ U8 *p, U8* ustrp, STRLEN *lenp, SV **swashp,char *normal if (*lenp > 1 || UNI_IS_INVARIANT(c)) Copy(s, ustrp, *lenp, U8); else { + c = UTF_TO_NATIVE(c); /* something in the 0x80..0xFF range */ ustrp[0] = UTF8_EIGHT_BIT_HI(c); ustrp[1] = UTF8_EIGHT_BIT_LO(c);