From: Jarkko Hietaniemi Date: Thu, 12 Jul 2001 04:47:43 +0000 (+0000) Subject: Now the :locale pseudolayer *almost* works... X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f38d7863e9c890f6e7b5e922b65b103f87ccdb42;p=p5sagit%2Fp5-mst-13.2.git Now the :locale pseudolayer *almost* works... p4raw-id: //depot/perl@11292 --- diff --git a/lib/open.pm b/lib/open.pm index c338abf..a42f623 100644 --- a/lib/open.pm +++ b/lib/open.pm @@ -67,12 +67,15 @@ sub import { if ($locale_encoding =~ /^utf-?8$/i) { $layer = "utf8"; } else { - $layer = "encoding($locale_encoding)"; + $layer = "encoding"; } } unless(PerlIO::Layer::->find($layer)) { carp("Unknown discipline layer '$layer'"); } + if (defined $locale_encoding) { + $layer = "$layer($locale_encoding)"; + } push(@val,":$layer"); if ($layer =~ /^(crlf|raw)$/) { $^H{"open_$type"} = $layer;