summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-02-27 14:21:16 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-02-27 14:21:16 +0000
commitf4e86e0f0c3be53056766cf9081a449e60f2fb28 (patch)
tree71d84322d48118e34a37c3c580dcf1ad097cebb4 /sv.c
parentf0d430785f65109b00384bce73f531f45cb6187b (diff)
downloadperl-f4e86e0f0c3be53056766cf9081a449e60f2fb28.tar.gz
propagate utf8ness in sv_setsv() (from Gisle Aas)
p4raw-id: //depot/perl@5283
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sv.c b/sv.c
index 2f5ea0b7b7..46a99081e9 100644
--- 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);