diff options
author | Nicholas Clark <nick@ccl4.org> | 2008-05-10 12:35:31 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2008-05-10 12:35:31 +0000 |
commit | 0263186c5d39f3f23552d1bbfa76bd53508fb505 (patch) | |
tree | 136b8bb24fb97122e4b5c753784d896cfe62f71d /ext/Encode | |
parent | a94e4597e1b418bff145cd900d0d59a59b19b47c (diff) | |
download | perl-0263186c5d39f3f23552d1bbfa76bd53508fb505.tar.gz |
Upgrade to Encode 2.25
p4raw-id: //depot/perl@33800
Diffstat (limited to 'ext/Encode')
-rw-r--r-- | ext/Encode/Changes | 17 | ||||
-rw-r--r-- | ext/Encode/Encode.pm | 7 | ||||
-rw-r--r-- | ext/Encode/Makefile.PL | 2 | ||||
-rw-r--r-- | ext/Encode/lib/Encode/Alias.pm | 2 | ||||
-rw-r--r-- | ext/Encode/lib/Encode/CN/HZ.pm | 4 | ||||
-rw-r--r-- | ext/Encode/lib/Encode/GSM0338.pm | 22 | ||||
-rw-r--r-- | ext/Encode/ucm/cp850.ucm | 2 | ||||
-rw-r--r-- | ext/Encode/ucm/cp852.ucm | 2 | ||||
-rw-r--r-- | ext/Encode/ucm/cp855.ucm | 2 | ||||
-rw-r--r-- | ext/Encode/ucm/cp856.ucm | 2 | ||||
-rw-r--r-- | ext/Encode/ucm/cp857.ucm | 2 | ||||
-rw-r--r-- | ext/Encode/ucm/cp858.ucm | 2 | ||||
-rw-r--r-- | ext/Encode/ucm/cp860.ucm | 2 | ||||
-rw-r--r-- | ext/Encode/ucm/cp861.ucm | 2 | ||||
-rw-r--r-- | ext/Encode/ucm/cp862.ucm | 2 | ||||
-rw-r--r-- | ext/Encode/ucm/cp863.ucm | 2 | ||||
-rw-r--r-- | ext/Encode/ucm/cp864.ucm | 2 | ||||
-rw-r--r-- | ext/Encode/ucm/cp865.ucm | 2 | ||||
-rw-r--r-- | ext/Encode/ucm/cp866.ucm | 2 | ||||
-rw-r--r-- | ext/Encode/ucm/cp869.ucm | 2 | ||||
-rw-r--r-- | ext/Encode/ucm/cp874.ucm | 2 | ||||
-rw-r--r-- | ext/Encode/ucm/cp875.ucm | 2 |
22 files changed, 53 insertions, 33 deletions
diff --git a/ext/Encode/Changes b/ext/Encode/Changes index 4ceb2ba8fb..50adc1cf0f 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 c76fcdb849..24a544a7a0 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 887d814eb8..65819d3f39 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 5ab72b99c9..e7db0ca719 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 943dc23c17..98c16a9053 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 b417809d21..5e57056e39 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 d77041d979..ab18c852f6 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 8ba2e47606..ec256665c1 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 b07ab04976..6f572242be 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 012404ea81..c1395a1156 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 8bf5600e0e..d74699f514 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 416b3e4b9a..07efc9ff07 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 bf96321ebc..989e7d45d9 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 e952ebe8cc..181ec93ebf 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 f7f48271e2..05686480e2 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 43bb59f5ee..a6cfc924e3 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 faeeec6cb1..5cf5b2faee 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 1e0f2c99f5..ce97e544e8 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 a6b45e61e9..f8903344e1 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 cf8fdf5c9b..a9058dbc1d 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 6dde1e4626..5b357c24ff 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 c5d401225e..c590122331 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 |