diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2007-03-30 08:30:35 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2007-03-30 08:30:35 +0000 |
commit | f0720f70fca1466afb0baffc79f6af7a9e80f428 (patch) | |
tree | 5f84f35ed750de7ac065a725050b8356cbab4fc0 /perlio.c | |
parent | abc718f2ca5cfe66c838e1324c1c153a085fea8b (diff) | |
download | perl-f0720f70fca1466afb0baffc79f6af7a9e80f428.tar.gz |
When dup'ing a filehandle, retain the :utf8 layer
p4raw-id: //depot/perl@30781
Diffstat (limited to 'perlio.c')
-rw-r--r-- | perlio.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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); } |