X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=ext%2FEncode%2Fencoding.pm;h=77ba4472a23a3cfcbc3bb692953a3dff9e4c1a78;hb=4ac71550d23cca4632a2bcdfcb1d83a6bf705e45;hp=72a1c82fc9998adca233b9cb9a809322b10ee3a9;hpb=7303322e8eea0327f60b8d4557cadc1e00e4f2d7;p=p5sagit%2Fp5-mst-13.2.git diff --git a/ext/Encode/encoding.pm b/ext/Encode/encoding.pm index 72a1c82..77ba447 100644 --- a/ext/Encode/encoding.pm +++ b/ext/Encode/encoding.pm @@ -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 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 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