propagate utf8ness in sv_setsv() (from Gisle Aas)
Gurusamy Sarathy [Sun, 27 Feb 2000 14:21:16 +0000 (14:21 +0000)]
p4raw-id: //depot/perl@5283

sv.c

diff --git a/sv.c b/sv.c
index 2f5ea0b..46a9908 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -2758,6 +2758,11 @@ 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);
            SvPV_set(sstr, Nullch);