summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin/perl/lib/open.pm
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2004-08-09 17:45:27 +0000
committermillert <millert@openbsd.org>2004-08-09 17:45:27 +0000
commit43890927971b33046ea25e594cdf3603586ca0bd (patch)
tree7a672bf5e0a7e43bf6e91d364fd7f9e7ab91f5ec /gnu/usr.bin/perl/lib/open.pm
parentRemove second instance of nls.c from the file list. (diff)
downloadwireguard-openbsd-43890927971b33046ea25e594cdf3603586ca0bd.tar.xz
wireguard-openbsd-43890927971b33046ea25e594cdf3603586ca0bd.zip
Import of stock perl 5.8.5
Diffstat (limited to 'gnu/usr.bin/perl/lib/open.pm')
-rw-r--r--gnu/usr.bin/perl/lib/open.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/gnu/usr.bin/perl/lib/open.pm b/gnu/usr.bin/perl/lib/open.pm
index fa2a5181b2f..32c5118be9d 100644
--- a/gnu/usr.bin/perl/lib/open.pm
+++ b/gnu/usr.bin/perl/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';
}
}
}