Change 32977 by rgs@scipion on 2008/01/14 22:48:46 When parsing LC_ALL or LANG to get the locale's encoding, ignore whatever is after the @, since that's a modifier, not an encoding. Affected files ... ... //depot/perl/ext/Encode/encoding.pm#48 edit Differences ... ==== //depot/perl/ext/Encode/encoding.pm#48 (text) ==== --- perl-5.10.0/ext/Encode/encoding.pm.pix 2007-12-18 10:47:08.000000000 +0000 +++ perl-5.10.0/ext/Encode/encoding.pm 2008-01-14 17:23:04.000000000 +0000 @@ -1,6 +1,6 @@ # $Id: encoding.pm,v 2.6 2007/04/22 14:56:12 dankogai Exp $ package encoding; -our $VERSION = do { my @r = ( q$Revision: 2.6 $ =~ /\d+/g ); sprintf "%d." . "%02d" x $#r, @r }; +our $VERSION = '2.6_01'; use Encode; use strict; @@ -51,10 +51,10 @@ no warnings 'uninitialized'; if ( not $locale_encoding && in_locale() ) { - if ( $ENV{LC_ALL} =~ /^([^.]+)\.([^.]+)$/ ) { + if ( $ENV{LC_ALL} =~ /^([^.]+)\.([^.@]+)(@.*)?$/ ) { ( $country_language, $locale_encoding ) = ( $1, $2 ); } - elsif ( $ENV{LANG} =~ /^([^.]+)\.([^.]+)$/ ) { + elsif ( $ENV{LANG} =~ /^([^.]+)\.([^.@]+)(@.*)?$/ ) { ( $country_language, $locale_encoding ) = ( $1, $2 ); }