r72037 - in /trunk/libencode-locale-perl: Changes META.yml debian/changelog lib/Encode/Locale.pm

periapt-guest at users.alioth.debian.org periapt-guest at users.alioth.debian.org
Tue Mar 29 19:44:35 UTC 2011


Author: periapt-guest
Date: Tue Mar 29 19:44:27 2011
New Revision: 72037

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=72037
Log:
New upstream release

Modified:
    trunk/libencode-locale-perl/Changes
    trunk/libencode-locale-perl/META.yml
    trunk/libencode-locale-perl/debian/changelog
    trunk/libencode-locale-perl/lib/Encode/Locale.pm

Modified: trunk/libencode-locale-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libencode-locale-perl/Changes?rev=72037&op=diff
==============================================================================
--- trunk/libencode-locale-perl/Changes (original)
+++ trunk/libencode-locale-perl/Changes Tue Mar 29 19:44:27 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: trunk/libencode-locale-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libencode-locale-perl/META.yml?rev=72037&op=diff
==============================================================================
--- trunk/libencode-locale-perl/META.yml (original)
+++ trunk/libencode-locale-perl/META.yml Tue Mar 29 19:44:27 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: trunk/libencode-locale-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libencode-locale-perl/debian/changelog?rev=72037&op=diff
==============================================================================
--- trunk/libencode-locale-perl/debian/changelog (original)
+++ trunk/libencode-locale-perl/debian/changelog Tue Mar 29 19:44:27 2011
@@ -1,3 +1,9 @@
+libencode-locale-perl (1.02-1) UNRELEASED; urgency=low
+
+  * New upstream release
+
+ -- Nicholas Bamber <nicholas at periapt.co.uk>  Tue, 29 Mar 2011 20:44:51 +0100
+
 libencode-locale-perl (1.01-1) unstable; urgency=low
 
   * Initial Release (Closes: #617518).

Modified: trunk/libencode-locale-perl/lib/Encode/Locale.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libencode-locale-perl/lib/Encode/Locale.pm?rev=72037&op=diff
==============================================================================
--- trunk/libencode-locale-perl/lib/Encode/Locale.pm (original)
+++ trunk/libencode-locale-perl/lib/Encode/Locale.pm Tue Mar 29 19:44:27 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