This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
SvUTF8() for globs.
[perl5.git] / sv.c
diff --git a/sv.c b/sv.c
index 73291a9..2d09ade 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -2961,6 +2961,7 @@ Perl_sv_2pv_flags(pTHX_ register SV *const sv, STRLEN *const lp, const I32 flags
                if (lp) {
                    *lp = SvCUR(buffer);
                }
+                if ( SvUTF8(buffer) ) SvUTF8_on(sv);
                return SvPVX(buffer);
            }
            else {