From: Jarkko Hietaniemi Date: Wed, 20 Mar 2002 14:37:05 +0000 (+0000) Subject: Tweaks from Autrijus Tang: should use euc-tw for Taiwan, X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=011f8d22855f3e69d20d9a6808fe8d9789c166af;p=p5sagit%2Fp5-mst-13.2.git Tweaks from Autrijus Tang: should use euc-tw for Taiwan, and :encoding(xxx) was errorneously parsed. p4raw-id: //depot/perl@15362 --- diff --git a/lib/open.pm b/lib/open.pm index 363a005..f66cb5b 100644 --- a/lib/open.pm +++ b/lib/open.pm @@ -48,7 +48,7 @@ sub _get_locale_encoding { } elsif ($country_language =~ /^zh_CN|chin(?:a|ese)?$/i) { $locale_encoding = 'euc-cn'; } elsif ($country_language =~ /^zh_TW|taiwan(?:ese)?$/i) { - $locale_encoding = 'big5'; + $locale_encoding = 'euc-tw'; } croak "Locale encoding 'euc' too ambiguous" if $locale_encoding eq 'euc'; @@ -90,7 +90,10 @@ sub import { } $std = 1; } else { - unless(PerlIO::Layer::->find($layer)) { + my $target = $layer; # the layer name itself + $target =~ s/^(\w+)\(.+\)$/$1/; # strip parameters + + unless(PerlIO::Layer::->find($target)) { carp("Unknown discipline layer '$layer'"); } }