PATCH: Large omnibus patch to clean up the JRRT quotes
[p5sagit/p5-mst-13.2.git] / ext / Encode / encoding.pm
index 72a1c82..77ba447 100644 (file)
@@ -1,6 +1,6 @@
-# $Id: encoding.pm,v 2.6 2007/04/22 14:56:12 dankogai Exp $
+# $Id: encoding.pm,v 2.7 2008/03/12 09:51:11 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;
@@ -50,11 +50,11 @@ sub _get_locale_encoding {
 
     no warnings 'uninitialized';
 
-    if ( not $locale_encoding && in_locale() ) {
-        if ( $ENV{LC_ALL} =~ /^([^.]+)\.([^.]+)$/ ) {
+    if ( (not $locale_encoding) && in_locale() ) {
+        if ( $ENV{LC_ALL} =~ /^([^.]+)\.([^.@]+)(@.*)?$/ ) {
             ( $country_language, $locale_encoding ) = ( $1, $2 );
         }
-        elsif ( $ENV{LANG} =~ /^([^.]+)\.([^.]+)$/ ) {
+        elsif ( $ENV{LANG} =~ /^([^.]+)\.([^.@]+)(@.*)?$/ ) {
             ( $country_language, $locale_encoding ) = ( $1, $2 );
         }
 
@@ -315,22 +315,6 @@ always the same as the length of C<$/> in the native encoding.
 
 This pragma affects utf8::upgrade, but not utf8::downgrade.
 
-=head2 Side effects
-
-If the C<encoding> pragma is in scope then the lengths returned are
-calculated from the length of C<$/> in Unicode characters, which is not
-always the same as the length of C<$/> in the native encoding.
-
-This pragma affects utf8::upgrade, but not utf8::downgrade.
-
-=head2 Side effects
-
-If the C<encoding> pragma is in scope then the lengths returned are
-calculated from the length of C<$/> in Unicode characters, which is not
-always the same as the length of C<$/> in the native encoding.
-
-This pragma affects utf8::upgrade, but not utf8::downgrade.
-
 =head1 FEATURES THAT REQUIRE 5.8.1
 
 Some of the features offered by this pragma requires perl 5.8.1.  Most