diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2002-02-02 01:31:50 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2002-02-02 01:31:50 +0000 |
commit | cddc7ef45eea6c8e3b036ab7ac758818e0ce1a76 (patch) | |
tree | b7e52b5831cd0bd56aa5450a0efec02ab9803892 /toke.c | |
parent | 4e7d7b1432eb6a136e30fccf1771755faf829ee2 (diff) | |
download | perl-cddc7ef45eea6c8e3b036ab7ac758818e0ce1a76.tar.gz |
EBCDIC: the low 256 \N{...} need to be remapped.
p4raw-id: //depot/perl@14519
Diffstat (limited to 'toke.c')
-rw-r--r-- | toke.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -1557,6 +1557,19 @@ S_scan_const(pTHX_ char *start) 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); |