diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2002-02-10 22:10:19 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2002-02-10 22:10:19 +0000 |
commit | 60a99fa7e5933af72f20cb54c8ec0609b948c270 (patch) | |
tree | 790e964afd848a1aca2dff02cd3aa3b37364a7ff /pp_pack.c | |
parent | 8906a23eaf1b10abd420be0a2fffed84df224b05 (diff) | |
download | perl-60a99fa7e5933af72f20cb54c8ec0609b948c270.tar.gz |
EBCDIC: the low 256 needs to be shuffled also
in pack/unpack U (this breaks the equivalence
of pack U and v-strings, but I think if someone
has to give, v-strings are a good victim)
p4raw-id: //depot/perl@14630
Diffstat (limited to 'pp_pack.c')
-rw-r--r-- | pp_pack.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -449,7 +449,7 @@ PP(pp_unpack) if (checksum) { while (len-- > 0 && s < strend) { STRLEN alen; - auint = utf8n_to_uvchr((U8*)s, strend - s, &alen, 0); + auint = UNI_TO_NATIVE(utf8n_to_uvchr((U8*)s, strend - s, &alen, 0)); along = alen; s += along; if (checksum > bits_in_uv) @@ -463,7 +463,7 @@ PP(pp_unpack) EXTEND_MORTAL(len); while (len-- > 0 && s < strend) { STRLEN alen; - auint = utf8n_to_uvchr((U8*)s, strend - s, &alen, 0); + auint = UNI_TO_NATIVE(utf8n_to_uvchr((U8*)s, strend - s, &alen, 0)); along = alen; s += along; sv = NEWSV(37, 0); @@ -1558,7 +1558,7 @@ PP(pp_pack) case 'U': while (len-- > 0) { fromstr = NEXTFROM; - auint = SvUV(fromstr); + auint = NATIVE_TO_UNI(SvUV(fromstr)); SvGROW(cat, SvCUR(cat) + UTF8_MAXLEN + 1); SvCUR_set(cat, (char*)uvchr_to_utf8((U8*)SvEND(cat),auint) - SvPVX(cat)); |