Change 32977 by [EMAIL PROTECTED] 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) ====
Index: perl/ext/Encode/encoding.pm
--- perl/ext/Encode/encoding.pm#47~32146~ 2007-10-19 04:06:58.000000000
-0700
+++ perl/ext/Encode/encoding.pm 2008-01-14 14:48:46.000000000 -0800
@@ -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} =~ /^([^.]+)\.([EMAIL PROTECTED])(@.*)?$/ ) {
( $country_language, $locale_encoding ) = ( $1, $2 );
}
- elsif ( $ENV{LANG} =~ /^([^.]+)\.([^.]+)$/ ) {
+ elsif ( $ENV{LANG} =~ /^([^.]+)\.([EMAIL PROTECTED])(@.*)?$/ ) {
( $country_language, $locale_encoding ) = ( $1, $2 );
}
End of Patch.