r72035 - in /branches/upstream/libencode-locale-perl/current: Changes META.yml lib/Encode/Locale.pm
periapt-guest at users.alioth.debian.org
periapt-guest at users.alioth.debian.org
Tue Mar 29 19:41:04 UTC 2011
Author: periapt-guest
Date: Tue Mar 29 19:40:21 2011
New Revision: 72035
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=72035
Log:
[svn-upgrade] new version libencode-locale-perl (1.02)
Modified:
branches/upstream/libencode-locale-perl/current/Changes
branches/upstream/libencode-locale-perl/current/META.yml
branches/upstream/libencode-locale-perl/current/lib/Encode/Locale.pm
Modified: branches/upstream/libencode-locale-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libencode-locale-perl/current/Changes?rev=72035&op=diff
==============================================================================
--- branches/upstream/libencode-locale-perl/current/Changes (original)
+++ branches/upstream/libencode-locale-perl/current/Changes Tue Mar 29 19:40:21 2011
@@ -1,3 +1,8 @@
+## 2011-03-28 Release 1.02
+
+Added supporting hacks for GB18030 and roman8. [RT#66373] [RT#67010]
+
+
## 2011-02-22 Release 1.01
Avoid compilation warnings (RT#65975). Thanks to Goro Fuji.
Modified: branches/upstream/libencode-locale-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libencode-locale-perl/current/META.yml?rev=72035&op=diff
==============================================================================
--- branches/upstream/libencode-locale-perl/current/META.yml (original)
+++ branches/upstream/libencode-locale-perl/current/META.yml Tue Mar 29 19:40:21 2011
@@ -1,6 +1,6 @@
--- #YAML:1.0
name: Encode-Locale
-version: 1.01
+version: 1.02
abstract: Determine the locale encoding
author:
- Gisle Aas <gisle at activestate.com>
Modified: branches/upstream/libencode-locale-perl/current/lib/Encode/Locale.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libencode-locale-perl/current/lib/Encode/Locale.pm?rev=72035&op=diff
==============================================================================
--- branches/upstream/libencode-locale-perl/current/lib/Encode/Locale.pm (original)
+++ branches/upstream/libencode-locale-perl/current/lib/Encode/Locale.pm Tue Mar 29 19:40:21 2011
@@ -1,7 +1,7 @@
package Encode::Locale;
use strict;
-our $VERSION = "1.01";
+our $VERSION = "1.02";
use base 'Exporter';
our @EXPORT_OK = qw(
@@ -56,6 +56,9 @@
# quite yet. Should avoid the CPAN testers failure reported from
# openbsd-4.7/perl-5.10.0 combo.
$ENCODING_LOCALE = "ascii" if $ENCODING_LOCALE eq "646";
+
+ # https://rt.cpan.org/Ticket/Display.html?id=66373
+ $ENCODING_LOCALE = "hp-roman8" if $^O eq "hpux" && $ENCODING_LOCALE eq "roman8";
};
$ENCODING_LOCALE ||= $ENCODING_CONSOLE_IN;
}
@@ -71,7 +74,19 @@
$ENCODING_CONSOLE_OUT ||= $ENCODING_CONSOLE_IN;
unless (Encode::find_encoding($ENCODING_LOCALE)) {
- die "The locale codeset ($ENCODING_LOCALE) isn't one that perl can decode, stopped";
+ my $foundit;
+ if (lc($ENCODING_LOCALE) eq "gb18030") {
+ eval {
+ require Encode::HanExtra;
+ };
+ if ($@) {
+ die "Need Encode::HanExtra to be installed to support locale codeset ($ENCODING_LOCALE), stopped";
+ }
+ $foundit++ if Encode::find_encoding($ENCODING_LOCALE);
+ }
+ die "The locale codeset ($ENCODING_LOCALE) isn't one that perl can decode, stopped"
+ unless $foundit;
+
}
}
@@ -228,7 +243,7 @@
=item reinit( $encoding )
Reinitialize the encodings from the locale. You want to call this function if
-changed anything in the environment that might influence the locale.
+you changed anything in the environment that might influence the locale.
This function will croak if the determined encoding isn't recognized by
the Encode module.
More information about the Pkg-perl-cvs-commits
mailing list