p4raw-id: //depot/perl@13964
UV f;
uvchr_to_utf8(tmpbuf, value);
- f = to_utf8_fold(tmpbuf, foldbuf, &foldlen);
+ to_utf8_fold(tmpbuf, foldbuf, &foldlen);
+ f = utf8_to_uvchr(foldbuf, 0);
if (f != value)
Perl_sv_catpvf(aTHX_ listsv, "%04"UVxf"\n", f);
UV f;
uvchr_to_utf8(tmpbuf, c);
- f = to_utf8_fold(tmpbuf, foldbuf, &foldlen);
-
+ to_utf8_fold(tmpbuf, foldbuf, &foldlen);
+ f = utf8_to_uvchr(foldbuf, 0);
+
if (c == (UV)UNICODE_GREEK_CAPITAL_LETTER_SIGMA ||
c == (UV)UNICODE_GREEK_SMALL_LETTER_FINAL_SIGMA)
c = (UV)UNICODE_GREEK_SMALL_LETTER_SIGMA;