From: Jarkko Hietaniemi Date: Thu, 12 Jul 2001 04:36:47 +0000 (+0000) Subject: Locale encoding tweaks. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5a192dee57837ac67b6c6d2786ac0b8ef2199c3f;p=p5sagit%2Fp5-mst-13.2.git Locale encoding tweaks. p4raw-id: //depot/perl@11291 --- diff --git a/lib/open.pm b/lib/open.pm index eda8658..c338abf 100644 --- a/lib/open.pm +++ b/lib/open.pm @@ -10,8 +10,7 @@ sub in_locale { $^H & $locale::hint_bits } sub _get_locale_encoding { unless (defined $locale_encoding) { - eval { require I18N::Langinfo; - import I18N::Langinfo qw(langinfo CODESET) }; + eval { use I18N::Langinfo qw(langinfo CODESET) }; unless ($@) { $locale_encoding = langinfo(CODESET); } @@ -35,7 +34,7 @@ sub _get_locale_encoding { defined $country_language) { if ($country_language =~ /^ja_JP|japan(?:ese)?$/i) { $locale_encoding = 'eucjp'; - } elsif ($country_language =~ /^ko_KR|korea(?:n)?$/i) { + } elsif ($country_language =~ /^ko_KR|korean?$/i) { $locale_encoding = 'euckr'; } elsif ($country_language =~ /^zh_TW|taiwan(?:ese)?$/i) { $locale_encoding = 'euctw';