sv_setsv() will steal the PVX from a source that have the TEMP flag set, but it also need to carry the corresponding UTF8 flag over to the destination SV. Regards, Gisle Index: sv.c =================================================================== RCS file: /local/perl/build/CVSROOT/perl5.6tobe2/sv.c,v retrieving revision 1.2 diff -u -p -p -r1.2 sv.c --- sv.c 2000/02/24 23:25:50 1.2 +++ sv.c 2000/02/27 00:55:33 @@ -2758,6 +2758,11 @@ Perl_sv_setsv(pTHX_ SV *dstr, register S 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);