diff options
author | Inaba Hiroto <inaba@st.rim.or.jp> | 2001-01-10 20:39:39 +0900 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-01-10 03:17:11 +0000 |
commit | 16ec844ddf6ed30b884deee1be32522f7b107b77 (patch) | |
tree | c91e1b6ae5eb98e6ea1062eb9259b4e6fbf8aac5 /doop.c | |
parent | c9f931b868379618cf79b68035f0c4b7583e1cac (diff) | |
download | perl-16ec844ddf6ed30b884deee1be32522f7b107b77.tar.gz |
Re: more UTF8 test suites and an UTF8 patch
Message-Id: <10101100239.AA10002@tux0017.sdd.tokyo-sc.toshiba.co.jp>
Some more UTF-8 tr cases fixed.
p4raw-id: //depot/perl@8385
Diffstat (limited to 'doop.c')
-rw-r--r-- | doop.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -333,9 +333,11 @@ S_do_trans_simple_utf8(pTHX_ SV *sv)/* SPC - OK */ dend = dstart + nlen; } } - if (grows) { + if (grows || hibit) { sv_setpvn(sv, (char*)dstart, d - dstart); Safefree(dstart); + if (grows && hibit) + Safefree(start); } else { *d = '\0'; @@ -343,8 +345,6 @@ S_do_trans_simple_utf8(pTHX_ SV *sv)/* SPC - OK */ } SvSETMAGIC(sv); SvUTF8_on(sv); - if (hibit) - Safefree(start); if (!isutf8 && !(PL_hints & HINT_UTF8)) sv_utf8_downgrade(sv, TRUE); @@ -517,17 +517,17 @@ S_do_trans_complex_utf8(pTHX_ SV *sv) /* SPC - NOT OK */ s += UTF8SKIP(s); } } - if (grows) { + if (grows || hibit) { sv_setpvn(sv, (char*)dstart, d - dstart); Safefree(dstart); + if (grows && hibit) + Safefree(start); } else { *d = '\0'; SvCUR_set(sv, d - dstart); } SvUTF8_on(sv); - if (hibit) - Safefree(start); if (!isutf8 && !(PL_hints & HINT_UTF8)) sv_utf8_downgrade(sv, TRUE); SvSETMAGIC(sv); |