summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2002-04-10 22:48:15 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-04-10 22:48:15 +0000
commit448e90bb58adc58c025beca8f02643764167d1a2 (patch)
tree54c2f2bf4540f44a6abb24da25a23a8c38c4d11f /ext
parent0c384302fa9d6386e98f7d7039a229d3aa669e80 (diff)
downloadperl-448e90bb58adc58c025beca8f02643764167d1a2.tar.gz
Upgrade to Encode 1.33, from Dan Kogai.
p4raw-id: //depot/perl@15852
Diffstat (limited to 'ext')
-rw-r--r--ext/Encode/AUTHORS3
-rw-r--r--ext/Encode/Changes19
-rw-r--r--ext/Encode/Encode.pm2
-rw-r--r--ext/Encode/bin/piconv2
-rw-r--r--ext/Encode/lib/Encode/Encoder.pm14
-rw-r--r--ext/Encode/lib/Encode/Supported.pod7
-rw-r--r--ext/Encode/lib/Encode/Unicode.pm4
-rw-r--r--ext/Encode/t/Encoder.t12
-rw-r--r--ext/Encode/t/bogus.ucm2
-rw-r--r--ext/Encode/ucm/adobeStdenc.ucm2
-rw-r--r--ext/Encode/ucm/adobeSymbol.ucm2
-rw-r--r--ext/Encode/ucm/adobeZdingbat.ucm2
-rw-r--r--ext/Encode/ucm/macROMnn.ucm2
13 files changed, 46 insertions, 27 deletions
diff --git a/ext/Encode/AUTHORS b/ext/Encode/AUTHORS
index fce9f0dbe9..b7097a3b26 100644
--- a/ext/Encode/AUTHORS
+++ b/ext/Encode/AUTHORS
@@ -23,6 +23,7 @@ Michael G Schwern <schwern@pobox.com>
Nicholas Clark <nick@ccl4.org>
Nick Ing-Simmons <nick@ing-simmons.net>
Paul Marquess <paul_marquess@yahoo.co.uk>
-Philip Newton <Philip.Newton@gmx.net>
+Philip Newton <pne@cpan.org>
SADAHIRO Tomoyuki <SADAHIRO@cpan.org>
Spider Boardman <spider@web.zk3.dec.com>
+Tatsuhiko Miyagawa <miyagawa@edge.co.jp>
diff --git a/ext/Encode/Changes b/ext/Encode/Changes
index 9e8444684b..55e698f98d 100644
--- a/ext/Encode/Changes
+++ b/ext/Encode/Changes
@@ -1,9 +1,22 @@
# Revision history for Perl extension Encode.
#
-# $Id: Changes,v 1.32 2002/04/09 20:06:15 dankogai Exp dankogai $
+# $Id: Changes,v 1.33 2002/04/10 22:28:40 dankogai Exp dankogai $
#
-1.32 $Date: 2002/04/09 20:06:15 $
+1.33 $Date: 2002/04/10 22:28:40 $
+! AUTHORS
+ Philip's mail address corrected.
+! AUTHORS
+! t/Encoder.t
+! lib/Encode/Encoder.pm
+ s/= shift;/= @_/g # trivial but a common idiomatic typo :)
+ This adds Miyagawa-kun to AUTHORS.
+ * encoding() no longer exported by default but on demand
+ * t/Encoder.t updated to test all these
+ Message-Id: <86hemjpdn4.wl@mail.edge.co.jp>
+ http://www.dan.co.jp/~dankogai/Storable.diff.gz
+
+1.32 2002/04/09 20:06:15
+ bin/ucmlint
+ t/bogus.ucm
- ucm/macDevanaga.ucm Unicode Character Map
@@ -233,7 +246,7 @@
Typo fixes and improvements by jhi
Message-Id: <200204010201.FAA03564@alpha.hut.fi>, et al.
-1.11 $Date: 2002/04/09 20:06:15 $
+1.11 $Date: 2002/04/10 22:28:40 $
+ t/encoding.t
+ t/jperl.t
! MANIFEST
diff --git a/ext/Encode/Encode.pm b/ext/Encode/Encode.pm
index efc77d81d5..b1e54e8cbc 100644
--- a/ext/Encode/Encode.pm
+++ b/ext/Encode/Encode.pm
@@ -1,6 +1,6 @@
package Encode;
use strict;
-our $VERSION = do { my @r = (q$Revision: 1.32 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r };
+our $VERSION = do { my @r = (q$Revision: 1.33 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r };
our $DEBUG = 0;
require DynaLoader;
diff --git a/ext/Encode/bin/piconv b/ext/Encode/bin/piconv
index f96512d50c..b70a1a801f 100644
--- a/ext/Encode/bin/piconv
+++ b/ext/Encode/bin/piconv
@@ -1,5 +1,5 @@
#!./perl
-# $Id: piconv,v 1.21 2002/04/09 20:06:15 dankogai Exp dankogai $
+# $Id: piconv,v 1.21 2002/04/09 20:06:15 dankogai Exp $
#
use 5.7.3;
use strict;
diff --git a/ext/Encode/lib/Encode/Encoder.pm b/ext/Encode/lib/Encode/Encoder.pm
index 33a3bd50d3..855b181094 100644
--- a/ext/Encode/lib/Encode/Encoder.pm
+++ b/ext/Encode/lib/Encode/Encoder.pm
@@ -1,14 +1,14 @@
#
-# $Id: Encoder.pm,v 0.2 2002/04/08 18:08:07 dankogai Exp $
+# $Id: Encoder.pm,v 0.3 2002/04/10 22:28:40 dankogai Exp dankogai $
#
package Encode::Encoder;
use strict;
use warnings;
-our $VERSION = do { my @r = (q$Revision: 0.2 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r };
+our $VERSION = do { my @r = (q$Revision: 0.3 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r };
require Exporter;
our @ISA = qw(Exporter);
-our @EXPORT = qw ( encoder );
+our @EXPORT_OK = qw ( encoder );
our $AUTOLOAD;
our $DEBUG = 0;
@@ -34,7 +34,7 @@ sub new{
sub encoder{ __PACKAGE__->new(@_) }
sub data{
- my ($self, $data) = shift;
+ my ($self, $data) = @_;
if (defined $data){
$self->{data} = $data;
return $data;
@@ -106,6 +106,7 @@ Encode::Encoder -- Object Oriented Encoder
# Encode::encode("ISO-8859-1", $data);
Encoder->new($data)->iso_8859_1; # OOP way
# shortcut
+ use Encode::Encoder qw(encoder);
encoder($data)->iso_8859_1;
# you can stack them!
encoder($data)->iso_8859_1->base64; # provided base64() is defined
@@ -166,7 +167,7 @@ This module predefines the methods below;
=item $e = Encode::Encoder-E<gt>new([$data, $encoding]);
-returns the encoder object. Its data is initialized with $data if
+returns an encoder object. Its data is initialized with $data if
there, and its encoding is set to $encoding if there.
When $encoding is omitted, it defaults to utf8 if $data is already in
@@ -174,8 +175,7 @@ utf8 or "" (empty string) otherwise.
=item encoder()
-is an alias of Encode::Encoder-E<gt>new(). This one is exported for
-convenience.
+is an alias of Encode::Encoder-E<gt>new(). This one is exported on demand.
=item $e-E<gt>data([$data])
diff --git a/ext/Encode/lib/Encode/Supported.pod b/ext/Encode/lib/Encode/Supported.pod
index 132e5a904d..7b31dbf906 100644
--- a/ext/Encode/lib/Encode/Supported.pod
+++ b/ext/Encode/lib/Encode/Supported.pod
@@ -489,7 +489,7 @@ with Encode. See L<Encode::KR> for details.
UTF-16 UTF-16BE UTF-16LE
-are a IANA-registered C<charset>s. See [RFC 2781] for details.
+are IANA-registered C<charset>s. See [RFC 2781] for details.
Jungshik Shin reports that UTF-16 with a BOM is well accepted
by MS IE 5/6 and NS 4/6. Beware however that
@@ -525,7 +525,6 @@ you're doing and unless you really benefit from using C<UTF-16>.
ISO-IR-165 [RFC1345]
- GBK
VISCII
GB 12345
GB 18030 (**) (see links bellow)
@@ -712,7 +711,7 @@ L<http://www.ecma.ch>
L<http://www.ecma.ch/ecma1/STAND/ECMA-035.HTM>
-The very dspecification of ISO-2022 is available from the link above.
+The very specification of ISO-2022 is available from the link above.
=back
@@ -729,7 +728,7 @@ L<http://www.iana.org/assignments/character-sets>
Most of the C<canonical names> in Encode derive from this list
so you can directly apply the string you have extracted from MIME
-header of mails and we pages.
+header of mails and web pages.
=back
diff --git a/ext/Encode/lib/Encode/Unicode.pm b/ext/Encode/lib/Encode/Unicode.pm
index 2686df7ca8..2a05ef0750 100644
--- a/ext/Encode/lib/Encode/Unicode.pm
+++ b/ext/Encode/lib/Encode/Unicode.pm
@@ -3,7 +3,7 @@ package Encode::Unicode;
use strict;
use warnings;
-our $VERSION = do { my @r = (q$Revision: 1.29 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r };
+our $VERSION = do { my @r = (q$Revision: 1.30 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r };
#
# Aux. subs & constants
@@ -403,7 +403,7 @@ up to \x{10ffff} even with 16-bit encodings. This pair of
half-character is now called a I<Surrogate Pair> and UTF-16 is the
name of the encoding that embraces them.
-Here is a fomula to ensurrogate a Unicode character \x{10000} and
+Here is a formula to ensurrogate a Unicode character \x{10000} and
above;
$hi = ($uni - 0x10000) / 0x400 + 0xD800;
diff --git a/ext/Encode/t/Encoder.t b/ext/Encode/t/Encoder.t
index e970eccc69..4cdb2523d5 100644
--- a/ext/Encode/t/Encoder.t
+++ b/ext/Encode/t/Encoder.t
@@ -1,5 +1,5 @@
#
-# $Id: Encoder.t,v 1.1 2002/04/08 18:07:31 dankogai Exp $
+# $Id: Encoder.t,v 1.2 2002/04/10 22:28:40 dankogai Exp dankogai $
#
BEGIN {
@@ -23,8 +23,8 @@ BEGIN {
use strict;
#use Test::More 'no_plan';
-use Test::More tests => 512;
-use Encode::Encoder;
+use Test::More tests => 516;
+use Encode::Encoder qw(encoder);
use MIME::Base64;
package Encode::Base64;
use base 'Encode::Encoding';
@@ -41,6 +41,12 @@ sub decode{
package main;
+my $e = encoder("foo", "ascii");
+ok ($e->data("bar"));
+is ($e->data, "bar");
+ok ($e->encoding("latin1"));
+is ($e->encoding, "iso-8859-1");
+
my $data = '';
for my $i (0..255){
no warnings;
diff --git a/ext/Encode/t/bogus.ucm b/ext/Encode/t/bogus.ucm
index 6eb2f72dd4..45883ab716 100644
--- a/ext/Encode/t/bogus.ucm
+++ b/ext/Encode/t/bogus.ucm
@@ -1,5 +1,5 @@
#
-# $Id: bogus.ucm,v 1.1 2002/04/09 20:06:15 dankogai Exp dankogai $
+# $Id: bogus.ucm,v 1.1 2002/04/09 20:06:15 dankogai Exp $
#
# based upon euc-jp
#
diff --git a/ext/Encode/ucm/adobeStdenc.ucm b/ext/Encode/ucm/adobeStdenc.ucm
index 52a757f15b..fc2941a52f 100644
--- a/ext/Encode/ucm/adobeStdenc.ucm
+++ b/ext/Encode/ucm/adobeStdenc.ucm
@@ -1,5 +1,5 @@
##
-# $Id: adobeStdenc.ucm,v 1.21 2002/04/09 20:06:15 dankogai Exp dankogai $
+# $Id: adobeStdenc.ucm,v 1.21 2002/04/09 20:06:15 dankogai Exp $
#
# Original table can be obtained at
# http://www.unicode.org/Public/MAPPINGS/VENDORS/ADOBE/stdenc.txt
diff --git a/ext/Encode/ucm/adobeSymbol.ucm b/ext/Encode/ucm/adobeSymbol.ucm
index e7b59c2a7f..79a44c9fcb 100644
--- a/ext/Encode/ucm/adobeSymbol.ucm
+++ b/ext/Encode/ucm/adobeSymbol.ucm
@@ -1,5 +1,5 @@
#
-# $Id: adobeSymbol.ucm,v 1.21 2002/04/09 20:06:15 dankogai Exp dankogai $
+# $Id: adobeSymbol.ucm,v 1.21 2002/04/09 20:06:15 dankogai Exp $
#
# Original table can be obtained at
# http://www.unicode.org/Public/MAPPINGS/VENDORS/ADOBE/symbol.txt
diff --git a/ext/Encode/ucm/adobeZdingbat.ucm b/ext/Encode/ucm/adobeZdingbat.ucm
index 18e68e7936..36792a3fac 100644
--- a/ext/Encode/ucm/adobeZdingbat.ucm
+++ b/ext/Encode/ucm/adobeZdingbat.ucm
@@ -1,5 +1,5 @@
#
-# $Id: adobeZdingbat.ucm,v 1.21 2002/04/09 20:06:15 dankogai Exp dankogai $
+# $Id: adobeZdingbat.ucm,v 1.21 2002/04/09 20:06:15 dankogai Exp $
#
# Original table can be obtained at
# http://www.unicode.org/Public/MAPPINGS/VENDORS/ADOBE/zdingbat.txt
diff --git a/ext/Encode/ucm/macROMnn.ucm b/ext/Encode/ucm/macROMnn.ucm
index 90f7a6b13b..f51382ef3b 100644
--- a/ext/Encode/ucm/macROMnn.ucm
+++ b/ext/Encode/ucm/macROMnn.ucm
@@ -1,5 +1,5 @@
#
-# $Id: macROMnn.ucm,v 1.21 2002/04/09 20:06:15 dankogai Exp dankogai $
+# $Id: macROMnn.ucm,v 1.21 2002/04/09 20:06:15 dankogai Exp $
#
# Original table can be obtained at
# http://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/ROMANIAN.TXT