From: Nicholas Clark Date: Sat, 10 May 2008 12:35:31 +0000 (+0000) Subject: Upgrade to Encode 2.25 X-Git-Tag: accepted/trunk/20130322.191538~13148 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0263186c5d39f3f23552d1bbfa76bd53508fb505;p=platform%2Fupstream%2Fperl.git Upgrade to Encode 2.25 p4raw-id: //depot/perl@33800 --- diff --git a/ext/Encode/Changes b/ext/Encode/Changes index 4ceb2ba..50adc1c 100644 --- a/ext/Encode/Changes +++ b/ext/Encode/Changes @@ -1,8 +1,21 @@ # Revision history for Perl extension Encode. # -# $Id: Changes,v 2.24 2008/03/12 09:51:11 dankogai Exp $ +# $Id: Changes,v 2.25 2008/05/07 20:56:05 dankogai Exp dankogai $ # -$Revision: 2.24 $ $Date: 2008/03/12 09:51:11 $ +$Revision: 2.25 $ $Date: 2008/05/07 20:56:05 $ +! Encode.pm + added ':default' to Exporter option. +! lib/Encode/GSM0338.pm + GSM0338 now handles coderef in CHECK + http://rt.cpan.org/Ticket/Display.html?id=31335 +! Makefile.PL + Perl 5.10/Encode 2.24: Tiny typo in Encode's Makefile.PL arg processing + Message-Id: <961C2A4F-92B3-416D-A9F9-E7B0ADA9F134@fsck.com> +! lib/Encode/Alias.pm + "This fix for Encode::Alias should make Solaris happy:" + Message-ID: <47D886D9.6060001@iki.fi> + +$Revision: 2.25 $ $Date: 2008/05/07 20:56:05 $ ! lib/Encode/Config.pm adds and fixes also adds cp858 support. ! Encode.pm encoding.pm lib/Encode/Alias.pm ucm/cp858.ucm diff --git a/ext/Encode/Encode.pm b/ext/Encode/Encode.pm index c76fcdb..24a544a 100644 --- a/ext/Encode/Encode.pm +++ b/ext/Encode/Encode.pm @@ -1,10 +1,10 @@ # -# $Id: Encode.pm,v 2.24 2008/03/12 09:58:12 dankogai Exp dankogai $ +# $Id: Encode.pm,v 2.25 2008/05/07 20:56:05 dankogai Exp dankogai $ # package Encode; use strict; use warnings; -our $VERSION = sprintf "%d.%02d", q$Revision: 2.24 $ =~ /(\d+)/g; +our $VERSION = sprintf "%d.%02d", q$Revision: 2.25 $ =~ /(\d+)/g; sub DEBUG () { 0 } use XSLoader (); XSLoader::load( __PACKAGE__, $VERSION ); @@ -36,7 +36,8 @@ our @EXPORT_OK = ( our %EXPORT_TAGS = ( all => [ @EXPORT, @EXPORT_OK ], - fallbacks => [@FB_CONSTS], + default => [ @EXPORT ], + fallbacks => [ @FB_CONSTS ], fallback_all => [ @FB_CONSTS, @FB_FLAGS ], ); diff --git a/ext/Encode/Makefile.PL b/ext/Encode/Makefile.PL index 887d814..65819d3 100644 --- a/ext/Encode/Makefile.PL +++ b/ext/Encode/Makefile.PL @@ -1,5 +1,5 @@ # -# $Id: Makefile.PL,v 2.5 2007/05/29 18:15:32 dankogai Exp $ +# $Id: Makefile.PL,v 2.6 2008/05/07 20:56:05 dankogai Exp dankogai $ # use 5.007003; use strict; diff --git a/ext/Encode/lib/Encode/Alias.pm b/ext/Encode/lib/Encode/Alias.pm index 5ab72b9..e7db0ca 100644 --- a/ext/Encode/lib/Encode/Alias.pm +++ b/ext/Encode/lib/Encode/Alias.pm @@ -2,7 +2,7 @@ package Encode::Alias; use strict; use warnings; no warnings 'redefine'; -our $VERSION = '2.8_01';# do { my @r = ( q$Revision: 2.8 $ =~ /\d+/g ); sprintf "%d." . "%02d" x $#r, @r }; +our $VERSION = do { my @r = ( q$Revision: 2.9 $ =~ /\d+/g ); sprintf "%d." . "%02d" x $#r, @r }; sub DEBUG () { 0 } use base qw(Exporter); diff --git a/ext/Encode/lib/Encode/CN/HZ.pm b/ext/Encode/lib/Encode/CN/HZ.pm index 943dc23..98c16a9 100644 --- a/ext/Encode/lib/Encode/CN/HZ.pm +++ b/ext/Encode/lib/Encode/CN/HZ.pm @@ -2,9 +2,10 @@ package Encode::CN::HZ; use strict; use warnings; +use utf8 (); use vars qw($VERSION); -$VERSION = do { my @r = ( q$Revision: 2.4 $ =~ /\d+/g ); sprintf "%d." . "%02d" x $#r, @r }; +$VERSION = do { my @r = ( q$Revision: 2.5 $ =~ /\d+/g ); sprintf "%d." . "%02d" x $#r, @r }; use Encode qw(:fallbacks); @@ -183,6 +184,7 @@ sub encode($$;$) { $ret .= "\x7E\x7D"; # '~}' $in_ascii = 1; } + utf8::encode($ret); # https://rt.cpan.org/Ticket/Display.html?id=35120 return $ret; } diff --git a/ext/Encode/lib/Encode/GSM0338.pm b/ext/Encode/lib/Encode/GSM0338.pm index b417809..5e57056 100644 --- a/ext/Encode/lib/Encode/GSM0338.pm +++ b/ext/Encode/lib/Encode/GSM0338.pm @@ -1,5 +1,5 @@ # -# $Id: GSM0338.pm,v 2.0 2007/04/22 14:54:22 dankogai Exp $ +# $Id: GSM0338.pm,v 2.1 2008/05/07 20:56:05 dankogai Exp dankogai $ # package Encode::GSM0338; @@ -8,7 +8,7 @@ use warnings; use Carp; use vars qw($VERSION); -$VERSION = do { my @r = ( q$Revision: 2.0 $ =~ /\d+/g ); sprintf "%d." . "%02d" x $#r, @r }; +$VERSION = do { my @r = ( q$Revision: 2.1 $ =~ /\d+/g ); sprintf "%d." . "%02d" x $#r, @r }; use Encode qw(:fallbacks); @@ -198,9 +198,11 @@ sub decode ($$;$) { } else { $u = - exists $GSM2UNI{$c} ? $GSM2UNI{$c} - : $chk - ? croak sprintf( "\\x%02X does not map to Unicode", ord($c) ) + exists $GSM2UNI{$c} + ? $GSM2UNI{$c} + : $chk ? ref $chk eq 'CODE' + ? $chk->( ord $c ) + : croak sprintf( "\\x%02X does not map to Unicode", ord($c) ) : $FBCHAR; } $str .= $u; @@ -218,10 +220,12 @@ sub encode($$;$) { my $u = substr( $str, 0, 1, '' ); my $c; $bytes .= - exists $UNI2GSM{$u} ? $UNI2GSM{$u} - : $chk - ? croak sprintf( "\\x{%04x} does not map to %s", - ord($u), $obj->name ) + exists $UNI2GSM{$u} + ? $UNI2GSM{$u} + : $chk ? ref $chk eq 'CODE' + ? $chk->( ord($u) ) + : croak sprintf( "\\x{%04x} does not map to %s", + ord($u), $obj->name ) : $FBCHAR; } $_[1] = $str if $chk; diff --git a/ext/Encode/ucm/cp850.ucm b/ext/Encode/ucm/cp850.ucm index d77041d..ab18c85 100644 --- a/ext/Encode/ucm/cp850.ucm +++ b/ext/Encode/ucm/cp850.ucm @@ -1,5 +1,5 @@ # -# $Id: cp850.ucm,v 2.0 2004/05/16 20:55:21 dankogai Exp $ +# $Id: cp850.ucm,v 1.1 2008/05/07 20:56:05 dankogai Exp dankogai $ # # Original table can be obtained at # http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/PC/CP850.TXT diff --git a/ext/Encode/ucm/cp852.ucm b/ext/Encode/ucm/cp852.ucm index 8ba2e47..ec25666 100644 --- a/ext/Encode/ucm/cp852.ucm +++ b/ext/Encode/ucm/cp852.ucm @@ -1,5 +1,5 @@ # -# $Id: cp852.ucm,v 2.0 2004/05/16 20:55:21 dankogai Exp $ +# $Id: cp852.ucm,v 1.1 2008/05/07 20:56:05 dankogai Exp dankogai $ # # Original table can be obtained at # http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/PC/CP852.TXT diff --git a/ext/Encode/ucm/cp855.ucm b/ext/Encode/ucm/cp855.ucm index b07ab04..6f57224 100644 --- a/ext/Encode/ucm/cp855.ucm +++ b/ext/Encode/ucm/cp855.ucm @@ -1,5 +1,5 @@ # -# $Id: cp855.ucm,v 2.0 2004/05/16 20:55:21 dankogai Exp $ +# $Id: cp855.ucm,v 1.1 2008/05/07 20:56:05 dankogai Exp dankogai $ # # Original table can be obtained at # http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/PC/CP855.TXT diff --git a/ext/Encode/ucm/cp856.ucm b/ext/Encode/ucm/cp856.ucm index 012404e..c1395a1 100644 --- a/ext/Encode/ucm/cp856.ucm +++ b/ext/Encode/ucm/cp856.ucm @@ -1,5 +1,5 @@ # -# $Id: cp856.ucm,v 2.0 2004/05/16 20:55:21 dankogai Exp $ +# $Id: cp856.ucm,v 1.1 2008/05/07 20:56:05 dankogai Exp dankogai $ # # Original table can be obtained at # http://www.unicode.org/Public/MAPPINGS/VENDORS/MISC/CP856.TXT diff --git a/ext/Encode/ucm/cp857.ucm b/ext/Encode/ucm/cp857.ucm index 8bf5600..d74699f 100644 --- a/ext/Encode/ucm/cp857.ucm +++ b/ext/Encode/ucm/cp857.ucm @@ -1,5 +1,5 @@ # -# $Id: cp857.ucm,v 2.0 2004/05/16 20:55:21 dankogai Exp $ +# $Id: cp857.ucm,v 1.1 2008/05/07 20:56:05 dankogai Exp dankogai $ # # Original table can be obtained at # http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/PC/CP857.TXT diff --git a/ext/Encode/ucm/cp858.ucm b/ext/Encode/ucm/cp858.ucm index 416b3e4..07efc9f 100644 --- a/ext/Encode/ucm/cp858.ucm +++ b/ext/Encode/ucm/cp858.ucm @@ -1,5 +1,5 @@ # -# $Id: cp858.ucm,v 1.1 2008/03/12 09:51:11 dankogai Exp $ +# $Id: cp858.ucm,v 1.1 2008/05/07 20:56:05 dankogai Exp dankogai $ # # cf. http://en.wikipedia.org/wiki/Code_page_858 # diff --git a/ext/Encode/ucm/cp860.ucm b/ext/Encode/ucm/cp860.ucm index bf96321..989e7d4 100644 --- a/ext/Encode/ucm/cp860.ucm +++ b/ext/Encode/ucm/cp860.ucm @@ -1,5 +1,5 @@ # -# $Id: cp860.ucm,v 2.0 2004/05/16 20:55:21 dankogai Exp $ +# $Id: cp860.ucm,v 1.1 2008/05/07 20:56:05 dankogai Exp dankogai $ # # Original table can be obtained at # http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/PC/CP860.TXT diff --git a/ext/Encode/ucm/cp861.ucm b/ext/Encode/ucm/cp861.ucm index e952ebe..181ec93 100644 --- a/ext/Encode/ucm/cp861.ucm +++ b/ext/Encode/ucm/cp861.ucm @@ -1,5 +1,5 @@ # -# $Id: cp861.ucm,v 2.0 2004/05/16 20:55:21 dankogai Exp $ +# $Id: cp861.ucm,v 1.1 2008/05/07 20:56:05 dankogai Exp dankogai $ # # Original table can be obtained at # http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/PC/CP861.TXT diff --git a/ext/Encode/ucm/cp862.ucm b/ext/Encode/ucm/cp862.ucm index f7f4827..0568648 100644 --- a/ext/Encode/ucm/cp862.ucm +++ b/ext/Encode/ucm/cp862.ucm @@ -1,5 +1,5 @@ # -# $Id: cp862.ucm,v 2.0 2004/05/16 20:55:21 dankogai Exp $ +# $Id: cp862.ucm,v 1.1 2008/05/07 20:56:05 dankogai Exp dankogai $ # # Original table can be obtained at # http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/PC/CP862.TXT diff --git a/ext/Encode/ucm/cp863.ucm b/ext/Encode/ucm/cp863.ucm index 43bb59f..a6cfc92 100644 --- a/ext/Encode/ucm/cp863.ucm +++ b/ext/Encode/ucm/cp863.ucm @@ -1,5 +1,5 @@ # -# $Id: cp863.ucm,v 2.0 2004/05/16 20:55:21 dankogai Exp $ +# $Id: cp863.ucm,v 1.1 2008/05/07 20:56:05 dankogai Exp dankogai $ # # Original table can be obtained at # http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/PC/CP863.TXT diff --git a/ext/Encode/ucm/cp864.ucm b/ext/Encode/ucm/cp864.ucm index faeeec6..5cf5b2f 100644 --- a/ext/Encode/ucm/cp864.ucm +++ b/ext/Encode/ucm/cp864.ucm @@ -1,5 +1,5 @@ # -# $Id: cp864.ucm,v 2.0 2004/05/16 20:55:21 dankogai Exp $ +# $Id: cp864.ucm,v 1.1 2008/05/07 20:56:05 dankogai Exp dankogai $ # # Original table can be obtained at # http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/PC/CP864.TXT diff --git a/ext/Encode/ucm/cp865.ucm b/ext/Encode/ucm/cp865.ucm index 1e0f2c9..ce97e54 100644 --- a/ext/Encode/ucm/cp865.ucm +++ b/ext/Encode/ucm/cp865.ucm @@ -1,5 +1,5 @@ # -# $Id: cp865.ucm,v 2.0 2004/05/16 20:55:21 dankogai Exp $ +# $Id: cp865.ucm,v 1.1 2008/05/07 20:56:05 dankogai Exp dankogai $ # # Original table can be obtained at # http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/PC/CP865.TXT diff --git a/ext/Encode/ucm/cp866.ucm b/ext/Encode/ucm/cp866.ucm index a6b45e6..f890334 100644 --- a/ext/Encode/ucm/cp866.ucm +++ b/ext/Encode/ucm/cp866.ucm @@ -1,5 +1,5 @@ # -# $Id: cp866.ucm,v 2.0 2004/05/16 20:55:21 dankogai Exp $ +# $Id: cp866.ucm,v 1.1 2008/05/07 20:56:05 dankogai Exp dankogai $ # # Original table can be obtained at # http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/PC/CP866.TXT diff --git a/ext/Encode/ucm/cp869.ucm b/ext/Encode/ucm/cp869.ucm index cf8fdf5..a9058db 100644 --- a/ext/Encode/ucm/cp869.ucm +++ b/ext/Encode/ucm/cp869.ucm @@ -1,5 +1,5 @@ # -# $Id: cp869.ucm,v 2.0 2004/05/16 20:55:21 dankogai Exp $ +# $Id: cp869.ucm,v 1.1 2008/05/07 20:56:05 dankogai Exp dankogai $ # # Original table can be obtained at # http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/PC/CP869.TXT diff --git a/ext/Encode/ucm/cp874.ucm b/ext/Encode/ucm/cp874.ucm index 6dde1e4..5b357c2 100644 --- a/ext/Encode/ucm/cp874.ucm +++ b/ext/Encode/ucm/cp874.ucm @@ -1,5 +1,5 @@ # -# $Id: cp874.ucm,v 2.0 2004/05/16 20:55:21 dankogai Exp $ +# $Id: cp874.ucm,v 1.1 2008/05/07 20:56:05 dankogai Exp dankogai $ # # Original table can be obtained at # http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP874.TXT diff --git a/ext/Encode/ucm/cp875.ucm b/ext/Encode/ucm/cp875.ucm index c5d4012..c590122 100644 --- a/ext/Encode/ucm/cp875.ucm +++ b/ext/Encode/ucm/cp875.ucm @@ -1,5 +1,5 @@ # -# $Id: cp875.ucm,v 2.0 2004/05/16 20:55:21 dankogai Exp $ +# $Id: cp875.ucm,v 1.1 2008/05/07 20:56:05 dankogai Exp dankogai $ # # Original table can be obtained at # http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/EBCDIC/CP875.TXT