Change 16392 by jhi@alpha on 2002/05/04 15:58:53
Upgrade to Encode 1.69.
Affected files ...
.... //depot/perl/ext/Encode/AUTHORS#16 edit
.... //depot/perl/ext/Encode/Changes#35 edit
.... //depot/perl/ext/Encode/Encode.pm#113 edit
.... //depot/perl/ext/Encode/Encode/Makefile_PL.e2x#8 edit
.... //depot/perl/ext/Encode/Unicode/Unicode.pm#5 edit
.... //depot/perl/ext/Encode/lib/Encode/Alias.pm#18 edit
.... //depot/perl/ext/Encode/lib/Encode/Guess.pm#7 edit
.... //depot/perl/ext/Encode/lib/Encode/MIME/Header.pm#4 edit
.... //depot/perl/ext/Encode/t/mime-header.t#5 edit
Differences ...
==== //depot/perl/ext/Encode/AUTHORS#16 (text) ====
Index: perl/ext/Encode/AUTHORS
--- perl/ext/Encode/AUTHORS.~1~ Sat May 4 10:15:05 2002
+++ perl/ext/Encode/AUTHORS Sat May 4 10:15:05 2002
@@ -17,6 +17,7 @@
Dan Kogai <[EMAIL PROTECTED]>
Elizabeth Mattijsen <[EMAIL PROTECTED]>
Gerrit P. Haase <[EMAIL PROTECTED]>
+Graham Barr <[EMAIL PROTECTED]>
Gurusamy Sarathy <[EMAIL PROTECTED]>
H.Merijn Brand <[EMAIL PROTECTED]>
Jarkko Hietaniemi <[EMAIL PROTECTED]>
==== //depot/perl/ext/Encode/Changes#35 (text) ====
Index: perl/ext/Encode/Changes
--- perl/ext/Encode/Changes.~1~ Sat May 4 10:15:05 2002
+++ perl/ext/Encode/Changes Sat May 4 10:15:05 2002
@@ -1,9 +1,29 @@
# Revision history for Perl extension Encode.
#
-# $Id: Changes,v 1.68 2002/05/03 12:20:13 dankogai Exp $
+# $Id: Changes,v 1.69 2002/05/04 16:41:18 dankogai Exp dankogai $
#
-$Revision: 1.68 $ $Date: 2002/05/03 12:20:13 $
+$Revision: 1.69 $ $Date: 2002/05/04 16:41:18 $
+! lib/Encode/MIME/Header
+ Floating-point coerced for UNICOS (in integer arithmetics it folds
+ line one character too early). Verification by Mark is pending.
+ Message-Id: <[EMAIL PROTECTED]>
+! Unicode/Unicode.pm
+ more doc patch from Elizabeth
+ Message-Id: <[EMAIL PROTECTED]>
+! Encode/Makefile_PL.e2x
+ More platform-independent patch from Benjamin
+ Message-Id: <[EMAIL PROTECTED]>
+! lib/Encode/Guess AUTHORS
+ split regex fix by Graham Barr. Adds him to AUTHORS.
+ Message-Id: <[EMAIL PROTECTED]>
+! Encode/Makefile_PL.e2x
+ enc2xs script discovery made smarter and more sensible, first cited
+ by Miyagawa-kun and further suggestions by Rafael and Andreas
+! Encode.pm lib/Encode/Guess.pm t/fallback.t t/guess.t t/mime-header.t
+ "The EBCDIC remapping of the low 256 bites again" #16372 by jhi
+
+1.68 2002/05/03 12:20:13
! lib/Encode/Alias.pm lib/Encode/Supported.pod t/Alias.t AUTHORS
UCS-4 added to aliases of UTF-32 by Elizabeth Mattijsen. Alias.t
and Supported.pod modified to reflect the change. Elizabeth added
@@ -583,7 +603,7 @@
Typo fixes and improvements by jhi
Message-Id: <[EMAIL PROTECTED]>, et al.
-1.11 $Date: 2002/05/03 12:20:13 $
+1.11 $Date: 2002/05/04 16:41:18 $
+ t/encoding.t
+ t/jperl.t
! MANIFEST
==== //depot/perl/ext/Encode/Encode.pm#113 (text) ====
Index: perl/ext/Encode/Encode.pm
--- perl/ext/Encode/Encode.pm.~1~ Sat May 4 10:15:05 2002
+++ perl/ext/Encode/Encode.pm Sat May 4 10:15:05 2002
@@ -1,9 +1,9 @@
#
-# $Id: Encode.pm,v 1.68 2002/05/03 12:20:31 dankogai Exp $
+# $Id: Encode.pm,v 1.69 2002/05/04 16:41:18 dankogai Exp dankogai $
#
package Encode;
use strict;
-our $VERSION = do { my @r = (q$Revision: 1.68 $ =~ /\d+/g); sprintf "%d."."%02d" x
$#r, @r };
+our $VERSION = do { my @r = (q$Revision: 1.69 $ =~ /\d+/g); sprintf "%d."."%02d" x
+$#r, @r };
our $DEBUG = 0;
use XSLoader ();
XSLoader::load(__PACKAGE__, $VERSION);
==== //depot/perl/ext/Encode/Encode/Makefile_PL.e2x#8 (text) ====
Index: perl/ext/Encode/Encode/Makefile_PL.e2x
--- perl/ext/Encode/Encode/Makefile_PL.e2x.~1~ Sat May 4 10:15:05 2002
+++ perl/ext/Encode/Encode/Makefile_PL.e2x Sat May 4 10:15:05 2002
@@ -18,8 +18,8 @@
require File::Spec;
my ($enc2xs, $encode_h) = ();
PATHLOOP:
-for my $d (@Config{qw/bin sitebin vendorbin/},
- (split /:/, $ENV{PATH})){
+for my $d (@Config{qw/bin sitebin vendorbin/},
+ (split /$Config{path_sep}/o, $ENV{PATH})){
for my $f (qw/enc2xs enc2xs5.7.3/){
my $path = File::Spec->catfile($d, $f);
-x $path and $enc2xs = $path and last PATHLOOP;
==== //depot/perl/ext/Encode/Unicode/Unicode.pm#5 (text) ====
Index: perl/ext/Encode/Unicode/Unicode.pm
--- perl/ext/Encode/Unicode/Unicode.pm.~1~ Sat May 4 10:15:05 2002
+++ perl/ext/Encode/Unicode/Unicode.pm Sat May 4 10:15:05 2002
@@ -3,7 +3,7 @@
use strict;
use warnings;
-our $VERSION = do { my @r = (q$Revision: 1.36 $ =~ /\d+/g); sprintf "%d."."%02d" x
$#r, @r };
+our $VERSION = do { my @r = (q$Revision: 1.37 $ =~ /\d+/g); sprintf "%d."."%02d" x
+$#r, @r };
use XSLoader;
XSLoader::load(__PACKAGE__,$VERSION);
@@ -288,7 +288,8 @@
I<Character Encoding Scheme> A character encoding form plus byte
serialization. There are seven character encoding schemes in Unicode:
-UTF-8, UTF-16, UTF-16BE, UTF-16LE, UTF-32, UTF-32BE and UTF-32LE.
+UTF-8, UTF-16, UTF-16BE, UTF-16LE, UTF-32 (UCS-4), UTF-32BE (UCS-4BE) and
+UTF-32LE (UCS-4LE).
=item Quick Reference
@@ -330,7 +331,7 @@
or above is encountered during encode(), it C<ensurrogate>s them and
pushes the surrogate pair to the output stream.
-UTF-32 is a fixed-length encoding with each character taking 32 bits.
+UTF-32 (UCS-4) is a fixed-length encoding with each character taking 32 bits.
Since it is 32-bit, there is no need for I<surrogate pairs>.
=head2 by endianness
@@ -434,10 +435,11 @@
=head1 SEE ALSO
L<Encode>, L<http://www.unicode.org/glossary/>,
+L<http://www.unicode.org/unicode/faq/utf_bom.html>,
RFC 2781 L<http://rfc.net/rfc2781.html>,
-L<http://www.unicode.org/unicode/faq/utf_bom.html>
+The whole Unicode standard L<http://www.unicode.org/unicode/uni2book/u2.html>
Ch. 15, pp. 403 of C<Programming Perl (3rd Edition)>
by Larry Wall, Tom Christiansen, Jon Orwant;
==== //depot/perl/ext/Encode/lib/Encode/Alias.pm#18 (text) ====
Index: perl/ext/Encode/lib/Encode/Alias.pm
--- perl/ext/Encode/lib/Encode/Alias.pm.~1~ Sat May 4 10:15:05 2002
+++ perl/ext/Encode/lib/Encode/Alias.pm Sat May 4 10:15:05 2002
@@ -128,13 +128,13 @@
define_alias( qr/^(.*)$/ => '"\L$1"' );
# UTF/UCS stuff
- define_alias( qr/^UCS-?2-?LE$/i => '"UCS-2LE"' );
- define_alias( qr/^UCS-?2-?(BE)?$/i => '"UCS-2BE"',
+ define_alias( qr/^UCS-?2-?LE$/i => '"UCS-2LE"' );
+ define_alias( qr/^UCS-?2-?(BE)?$/i => '"UCS-2BE"',
qr/^UCS-?4-?(BE|LE)?$/i => 'uc("UTF-32$1")',
- qr/^iso-10646-1$/i => '"UCS-2BE"' );
- define_alias( qr/^UTF(16|32)-?BE$/i => '"UTF-$1BE"',
- qr/^UTF(16|32)-?LE$/i => '"UTF-$1LE"',
- qr/^UTF(16|32)$/i => '"UTF-$1"',
+ qr/^iso-10646-1$/i => '"UCS-2BE"' );
+ define_alias( qr/^UTF(16|32)-?BE$/i => '"UTF-$1BE"',
+ qr/^UTF(16|32)-?LE$/i => '"UTF-$1LE"',
+ qr/^UTF(16|32)$/i => '"UTF-$1"',
);
# ASCII
define_alias(qr/^(?:US-?)ascii$/i => '"ascii"');
==== //depot/perl/ext/Encode/lib/Encode/Guess.pm#7 (text) ====
Index: perl/ext/Encode/lib/Encode/Guess.pm
--- perl/ext/Encode/lib/Encode/Guess.pm.~1~ Sat May 4 10:15:05 2002
+++ perl/ext/Encode/lib/Encode/Guess.pm Sat May 4 10:15:05 2002
@@ -2,7 +2,7 @@
use strict;
use Encode qw(:fallbacks find_encoding);
-our $VERSION = do { my @r = (q$Revision: 1.5 $ =~ /\d+/g); sprintf "%d."."%02d" x
$#r, @r };
+our $VERSION = do { my @r = (q$Revision: 1.6 $ =~ /\d+/g); sprintf "%d."."%02d" x
+$#r, @r };
my $Canon = 'Guess';
our $DEBUG = 0;
@@ -87,7 +87,7 @@
$DEBUG and warn "Added: ", $e->name;
}
my $nline = 1;
- for my $line (split /\r|\n|\r\n/, $octet){
+ for my $line (split /\r\n?|\n/, $octet){
# cheat 2 -- \e in the string
if ($line =~ /\e/o){
my @keys = keys %try;
==== //depot/perl/ext/Encode/lib/Encode/MIME/Header.pm#4 (text) ====
Index: perl/ext/Encode/lib/Encode/MIME/Header.pm
--- perl/ext/Encode/lib/Encode/MIME/Header.pm.~1~ Sat May 4 10:15:05 2002
+++ perl/ext/Encode/lib/Encode/MIME/Header.pm Sat May 4 10:15:05 2002
@@ -1,7 +1,7 @@
package Encode::MIME::Header;
use strict;
# use warnings;
-our $VERSION = do { my @r = (q$Revision: 1.3 $ =~ /\d+/g); sprintf "%d."."%02d" x
$#r, @r };
+our $VERSION = do { my @r = (q$Revision: 1.4 $ =~ /\d+/g); sprintf "%d."."%02d" x
+$#r, @r };
use Encode qw(find_encoding encode_utf8);
use MIME::Base64;
@@ -128,7 +128,9 @@
my ($o, $str) = @_;
my $enc = $o->{encode};
my $llen = ($o->{bpl} - length(HEAD) - 2 - length(TAIL));
- $llen *= $enc eq 'B' ? 3/4 : 1/3;
+ # to coerce a floating-point arithmetics, the following contains
+ # .0 in numbers -- dankogai
+ $llen *= $enc eq 'B' ? 3.0/4.0 : 1.0/3.0;
my @result = ();
my $chunk = '';
while(my $chr = substr($str, 0, 1, '')){
==== //depot/perl/ext/Encode/t/mime-header.t#5 (text) ====
Index: perl/ext/Encode/t/mime-header.t
--- perl/ext/Encode/t/mime-header.t.~1~ Sat May 4 10:15:05 2002
+++ perl/ext/Encode/t/mime-header.t Sat May 4 10:15:05 2002
@@ -1,5 +1,5 @@
#
-# $Id: mime-header.t,v 1.3 2002/04/26 03:07:59 dankogai Exp $
+# $Id: mime-header.t,v 1.4 2002/05/04 16:41:18 dankogai Exp dankogai $
# This script is written in utf8
#
BEGIN {
End of Patch.