This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Make utf8::encode respect magic
[perl5.git] / universal.c
index cb49e0b..676c39b 100644 (file)
@@ -808,6 +808,7 @@ XS(XS_utf8_encode)
     if (items != 1)
        croak_xs_usage(cv, "sv");
     sv_utf8_encode(ST(0));
+    SvSETMAGIC(ST(0));
     XSRETURN_EMPTY;
 }