This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add a TODO test cases RT# 43403.
[perl5.git] / perlio.c
index ef07055..bbb12db 100644 (file)
--- a/perlio.c
+++ b/perlio.c
@@ -2268,6 +2268,8 @@ PerlIOBase_dup(pTHX_ PerlIO *f, PerlIO *o, CLONE_PARAMS *param, int flags)
        if (self->Getarg)
            arg = (*self->Getarg)(aTHX_ o, param, flags);
        f = PerlIO_push(aTHX_ f, self, PerlIO_modestr(o,buf), arg);
+       if (PerlIOBase(o)->flags & PERLIO_F_UTF8)
+           PerlIOBase(f)->flags |= PERLIO_F_UTF8;
        if (arg)
            SvREFCNT_dec(arg);
     }