diff options
author | Audrey Tang <cpan@audreyt.org> | 2004-03-20 02:27:10 +0800 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2004-03-19 12:15:23 +0000 |
commit | 8f6960eafa2ab3a951712db3243fe83d778df22d (patch) | |
tree | 7c7af748dcb0a26bf31769a978b419d0f0079908 /lib/open.pm | |
parent | b4ad57f4f7fe2aca6dc52ea357ce9be7a7d38769 (diff) | |
download | perl-8f6960eafa2ab3a951712db3243fe83d778df22d.tar.gz |
open.pm: allow upper-cased EUC
Message-Id: <20040319102710.GA91216@aut.dyndns.org>
p4raw-id: //depot/perl@22538
Diffstat (limited to 'lib/open.pm')
-rw-r--r-- | lib/open.pm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/open.pm b/lib/open.pm index fa2a5181b2..32c5118be9 100644 --- a/lib/open.pm +++ b/lib/open.pm @@ -3,7 +3,7 @@ use warnings; use Carp; $open::hint_bits = 0x20000; # HINT_LOCALIZE_HH -our $VERSION = '1.02'; +our $VERSION = '1.03'; my $locale_encoding; @@ -41,7 +41,7 @@ sub _get_locale_encoding { # would be excellent!) --jhi } if (defined $locale_encoding && - $locale_encoding eq 'euc' && + lc($locale_encoding) eq 'euc' && defined $country_language) { if ($country_language =~ /^ja_JP|japan(?:ese)?$/i) { $locale_encoding = 'euc-jp'; @@ -51,9 +51,9 @@ sub _get_locale_encoding { $locale_encoding = 'euc-cn'; } elsif ($country_language =~ /^zh_TW|taiwan(?:ese)?$/i) { $locale_encoding = 'euc-tw'; + } else { + croak "Locale encoding 'euc' too ambiguous"; } - croak "Locale encoding 'euc' too ambiguous" - if $locale_encoding eq 'euc'; } } } |