From: Rafael Garcia-Suarez Date: Wed, 22 Sep 2004 11:20:53 +0000 (+0200) Subject: Typo fix. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=00243fce2e6342da5c299fe3c6bd180ff12ba811;p=p5sagit%2Fp5-mst-13.2.git Typo fix. Subject: [PATCH] Re: Smoke [5.9.2] 23330 FAIL(X) hp-ux 11.11/64 (PA-2.0/64/2 cpu) Message-ID: <20040922112053.686562b6@valis.local> p4raw-id: //depot/perl@23334 --- diff --git a/lib/open.pm b/lib/open.pm index 35d33dd..092ec48 100644 --- a/lib/open.pm +++ b/lib/open.pm @@ -37,7 +37,7 @@ sub _drop_oldenc { return unless @new >= 1 && $new[-1] =~ /^:encoding\(.+\)$/; my @old = PerlIO::get_layers($h); return unless @old >= 3 && - $old[-1] eq 'utf8'; + $old[-1] eq 'utf8' && $old[-2] =~ /^encoding\(.+\)$/; my ($loname, $lcname) = _get_encname($old[-2]); unless (defined $lcname) { # Should we trust get_layers()?