diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 2000-05-07 16:05:16 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 2000-05-07 16:05:16 +0000 |
commit | 3aa33fe55ba20233f560f0c549294d8e83806012 (patch) | |
tree | c1b0f0f2434610012cab3d272fd45f8006b55411 /sv.c | |
parent | dfcb284a2bcae98854733134f50bc110c487b8a3 (diff) | |
download | perl-3aa33fe55ba20233f560f0c549294d8e83806012.tar.gz |
reverse() and quotemeta() weren't preserving utf8-ness; add tests
p4raw-id: //depot/perl@6087
Diffstat (limited to 'sv.c')
-rw-r--r-- | sv.c | 6 |
1 files changed, 1 insertions, 5 deletions
@@ -2774,10 +2774,6 @@ Perl_sv_setsv(pTHX_ SV *dstr, register SV *sstr) SvPV_set(dstr, SvPVX(sstr)); SvLEN_set(dstr, SvLEN(sstr)); SvCUR_set(dstr, SvCUR(sstr)); - if (SvUTF8(sstr)) - SvUTF8_on(dstr); - else - SvUTF8_off(dstr); SvTEMP_off(dstr); (void)SvOK_off(sstr); /* NOTE: nukes most SvFLAGS on sstr */ @@ -2795,7 +2791,7 @@ Perl_sv_setsv(pTHX_ SV *dstr, register SV *sstr) *SvEND(dstr) = '\0'; (void)SvPOK_only(dstr); } - if (DO_UTF8(sstr)) + if ((sflags & SVf_UTF8) && !IN_BYTE) SvUTF8_on(dstr); /*SUPPRESS 560*/ if (sflags & SVp_NOK) { |