diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2002-03-20 14:37:05 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2002-03-20 14:37:05 +0000 |
commit | 011f8d22855f3e69d20d9a6808fe8d9789c166af (patch) | |
tree | 794c8f3562f59299383e10e59b891958da3800eb /lib/open.pm | |
parent | 0dd6fc1455886b04e5f218d58712a0f8da848ea7 (diff) | |
download | perl-011f8d22855f3e69d20d9a6808fe8d9789c166af.tar.gz |
Tweaks from Autrijus Tang: should use euc-tw for Taiwan,
and :encoding(xxx) was errorneously parsed.
p4raw-id: //depot/perl@15362
Diffstat (limited to 'lib/open.pm')
-rw-r--r-- | lib/open.pm | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/open.pm b/lib/open.pm index 363a005619..f66cb5b0ed 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'"); } } |