Change 14519 by jhi@alpha on 2002/02/02 01:31:50

        EBCDIC: the low 256 \N{...} need to be remapped.

Affected files ...

.... //depot/perl/toke.c#414 edit

Differences ...

==== //depot/perl/toke.c#414 (text) ====
Index: perl/toke.c
--- perl/toke.c.~1~     Fri Feb  1 18:45:06 2002
+++ perl/toke.c Fri Feb  1 18:45:06 2002
@@ -1557,6 +1557,19 @@
                    if (has_utf8)
                        sv_utf8_upgrade(res);
                    str = SvPV(res,len);
+#ifdef EBCDIC
+                   {
+                        UV uv = utf8_to_uvchr((U8*)str, 0);
+
+                        if (uv < 0x100) {
+                             U8 tmpbuf[UTF8_MAXLEN+1], *d;
+
+                             d = uvchr_to_utf8(tmpbuf, UNI_TO_NATIVE(uv));
+                             sv_setpvn(res, (char *)tmpbuf, d - tmpbuf);
+                             str = SvPV(res, len);
+                        }
+                   }
+#endif
                    if (!has_utf8 && SvUTF8(res)) {
                        char *ostart = SvPVX(sv);
                        SvCUR_set(sv, d - ostart);
End of Patch.

Reply via email to