summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/Encode/Changes26
-rw-r--r--ext/Encode/Encode.pm6
-rw-r--r--ext/Encode/Encode.xs2
-rw-r--r--ext/Encode/META.yml4
-rw-r--r--ext/Encode/Unicode/Unicode.pm2
-rw-r--r--ext/Encode/Unicode/Unicode.xs2
-rw-r--r--ext/Encode/bin/piconv2
-rw-r--r--ext/Encode/encoding.pm8
-rw-r--r--ext/Encode/lib/Encode/Encoding.pm2
-rw-r--r--ext/Encode/lib/Encode/JP/JIS7.pm5
-rw-r--r--ext/Encode/t/Unicode.t2
-rw-r--r--ext/Encode/t/guess.t17
12 files changed, 58 insertions, 20 deletions
diff --git a/ext/Encode/Changes b/ext/Encode/Changes
index f729d18b1b..18f5788e92 100644
--- a/ext/Encode/Changes
+++ b/ext/Encode/Changes
@@ -1,8 +1,30 @@
# Revision history for Perl extension Encode.
#
-# $Id: Changes,v 1.95 2003/05/21 08:41:11 dankogai Exp $
+# $Id: Changes,v 1.96 2003/06/18 09:29:02 dankogai Exp $
#
-$Revision: 1.95 $ $Date: 2003/05/21 08:41:11 $
+$Revision: 1.96 $ $Date: 2003/06/18 09:29:02 $
+! lib/Encode/JP/JP.pm t/guess.t
+ m/(...)/ in void context then $1 is considered a Bad Thing
+ Message-Id: <B5AB34D0-A019-11D7-AF03-000393AE4244@dan.co.jp>
+! Encode.pm
+ Mentions in POD that as of perl 5.8.1 utf8::is_utf8() is
+ also available.
+! encengine.c
+ More typecast from maintperl@19739
+ Message-Id: <200306110645.h5B6j5D2009640@smtp3.ActiveState.com>
+! t/perlio.t
+ Tests 37 & 38 failed on Win32 -- yet another CRLF issue
+ Message-Id: <200306090733.h597XQPA031646@smtp3.ActiveState.com>
+! t/Encode.t
+ Now skips for EBCDIC platform.
+ Message-Id: <OF44B38062.A3998148-ON80256D27.004CF379@portsmouth.uk.ibm.com>
+! t/perlio.t
+ Craig's patch applied that addresses "Many systems (DOS, VMS) cannot
+ have more than one C<.> in their filenames." -- perlport.
+ Message-Id: <3ED79E01.8050401@mac.com>
+! bin/piconv
+ Found and fixed the back that -p,--perlqq does not work.
+ Induced by the change from Getopt::Std to Getopt::Long.
! encoding.pm
Addressed [cpan #2629] Wrong assumption in numeric comparison
Message-Id: <rt-2629-7326.19.5700583232515@cpan.org>
diff --git a/ext/Encode/Encode.pm b/ext/Encode/Encode.pm
index 4959b5fc17..57bcc2b0d2 100644
--- a/ext/Encode/Encode.pm
+++ b/ext/Encode/Encode.pm
@@ -1,9 +1,9 @@
#
-# $Id: Encode.pm,v 1.95 2003/05/21 08:40:59 dankogai Exp $
+# $Id: Encode.pm,v 1.96 2003/06/18 09:29:02 dankogai Exp $
#
package Encode;
use strict;
-our $VERSION = do { my @r = (q$Revision: 1.95 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r };
+our $VERSION = do { my @r = (q$Revision: 1.96 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r };
our $DEBUG = 0;
use XSLoader ();
XSLoader::load(__PACKAGE__, $VERSION);
@@ -739,6 +739,8 @@ implementation. As such, they are efficient but may change.
If CHECK is true, also checks the data in STRING for being well-formed
UTF-8. Returns true if successful, false otherwise.
+As of perl 5.8.1, L<utf8> also has utf8::is_utif8().
+
=item _utf8_on(STRING)
[INTERNAL] Turns on the UTF-8 flag in STRING. The data in STRING is
diff --git a/ext/Encode/Encode.xs b/ext/Encode/Encode.xs
index 7970058273..8bdcdfabfc 100644
--- a/ext/Encode/Encode.xs
+++ b/ext/Encode/Encode.xs
@@ -1,5 +1,5 @@
/*
- $Id: Encode.xs,v 1.55 2003/02/28 01:40:27 dankogai Exp dankogai $
+ $Id: Encode.xs,v 1.56 2003/06/18 09:29:02 dankogai Exp $
*/
#define PERL_NO_GET_CONTEXT
diff --git a/ext/Encode/META.yml b/ext/Encode/META.yml
index f48c93f149..075c6a9b67 100644
--- a/ext/Encode/META.yml
+++ b/ext/Encode/META.yml
@@ -1,9 +1,9 @@
#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
name: Encode
-version: 1.95
+version: 1.96
version_from: Encode.pm
installdirs: perl
requires:
distribution_type: module
-generated_by: ExtUtils::MakeMaker version 6.10_03
+generated_by: ExtUtils::MakeMaker version 6.10_05
diff --git a/ext/Encode/Unicode/Unicode.pm b/ext/Encode/Unicode/Unicode.pm
index 9648fd358f..4c23c0e171 100644
--- a/ext/Encode/Unicode/Unicode.pm
+++ b/ext/Encode/Unicode/Unicode.pm
@@ -4,7 +4,7 @@ use strict;
use warnings;
no warnings 'redefine';
-our $VERSION = do { my @r = (q$Revision: 1.39 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r };
+our $VERSION = do { my @r = (q$Revision: 1.40 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r };
use XSLoader;
XSLoader::load(__PACKAGE__,$VERSION);
diff --git a/ext/Encode/Unicode/Unicode.xs b/ext/Encode/Unicode/Unicode.xs
index cb27bb3c44..70b9a5d77c 100644
--- a/ext/Encode/Unicode/Unicode.xs
+++ b/ext/Encode/Unicode/Unicode.xs
@@ -1,5 +1,5 @@
/*
- $Id: Unicode.xs,v 1.7 2003/02/20 14:42:34 dankogai Exp dankogai $
+ $Id: Unicode.xs,v 1.8 2003/06/18 09:29:02 dankogai Exp $
*/
#define PERL_NO_GET_CONTEXT
diff --git a/ext/Encode/bin/piconv b/ext/Encode/bin/piconv
index ee400f541d..fbdb58046c 100644
--- a/ext/Encode/bin/piconv
+++ b/ext/Encode/bin/piconv
@@ -1,5 +1,5 @@
#!./perl
-# $Id: piconv,v 1.26 2003/05/10 18:13:59 dankogai Exp $
+# $Id: piconv,v 1.27 2003/06/18 09:29:02 dankogai Exp $
#
use 5.8.0;
use strict;
diff --git a/ext/Encode/encoding.pm b/ext/Encode/encoding.pm
index 5c922bd9b3..3fc6e4399e 100644
--- a/ext/Encode/encoding.pm
+++ b/ext/Encode/encoding.pm
@@ -1,6 +1,6 @@
-# $Id: encoding.pm,v 1.44 2003/03/09 20:07:37 dankogai Exp $
+# $Id: encoding.pm,v 1.45 2003/06/18 09:29:02 dankogai Exp $
package encoding;
-our $VERSION = do { my @r = (q$Revision: 1.44 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r };
+our $VERSION = do { my @r = (q$Revision: 1.45 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r };
use Encode;
use strict;
@@ -21,11 +21,11 @@ unless ($@){
sub _exception{
my $name = shift;
- $] > 5.008 and return 0; # 5.8.1 then no
+ $] > 5.008 and return 0; # 5.8.1 or higher then no
my %utfs = map {$_=>1}
qw(utf8 UCS-2BE UCS-2LE UTF-16 UTF-16BE UTF-16LE
UTF-32 UTF-32BE UTF-32LE);
- $utfs{$name} or return 0; # UTFs or no
+ $utfs{$name} or return 0; # UTFs or no
require Config; Config->import(); our %Config;
return $Config{perl_patchlevel} ? 0 : 1 # maintperl then no
}
diff --git a/ext/Encode/lib/Encode/Encoding.pm b/ext/Encode/lib/Encode/Encoding.pm
index 3978e9df89..6f196278e5 100644
--- a/ext/Encode/lib/Encode/Encoding.pm
+++ b/ext/Encode/lib/Encode/Encoding.pm
@@ -1,7 +1,7 @@
package Encode::Encoding;
# Base class for classes which implement encodings
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 };
require Encode;
diff --git a/ext/Encode/lib/Encode/JP/JIS7.pm b/ext/Encode/lib/Encode/JP/JIS7.pm
index d194c5a708..01a7f0e36c 100644
--- a/ext/Encode/lib/Encode/JP/JIS7.pm
+++ b/ext/Encode/lib/Encode/JP/JIS7.pm
@@ -1,7 +1,7 @@
package Encode::JP::JIS7;
use strict;
-our $VERSION = do { my @r = (q$Revision: 1.10 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r };
+our $VERSION = do { my @r = (q$Revision: 1.11 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r };
use Encode qw(:fallbacks);
@@ -35,8 +35,7 @@ sub decode($$;$)
my ($obj, $str, $chk) = @_;
my $residue = '';
if ($chk){
- $str =~ s/([^\x00-\x7f].*)$//so;
- $1 and $residue = $1;
+ $str =~ s/([^\x00-\x7f].*)$//so and $residue = $1;
}
$residue .= jis_euc(\$str);
$_[1] = $residue if $chk;
diff --git a/ext/Encode/t/Unicode.t b/ext/Encode/t/Unicode.t
index 0d5c6b9682..4c7292248e 100644
--- a/ext/Encode/t/Unicode.t
+++ b/ext/Encode/t/Unicode.t
@@ -1,5 +1,5 @@
#
-# $Id: Unicode.t,v 1.12 2003/05/21 08:41:11 dankogai Exp $
+# $Id: Unicode.t,v 1.13 2003/06/18 09:29:02 dankogai Exp $
#
# This script is written entirely in ASCII, even though quoted literals
# do include non-BMP unicode characters -- Are you happy, jhi?
diff --git a/ext/Encode/t/guess.t b/ext/Encode/t/guess.t
index d3ff58c998..55a75b4113 100644
--- a/ext/Encode/t/guess.t
+++ b/ext/Encode/t/guess.t
@@ -21,7 +21,7 @@ use File::Spec;
use Encode qw(decode encode find_encoding _utf8_off);
#use Test::More qw(no_plan);
-use Test::More tests => 23;
+use Test::More tests => 29;
use_ok("Encode::Guess");
{
no warnings;
@@ -99,4 +99,19 @@ for my $bl (qw/BE LE/){
my $result = guess_encoding($test);
ok(! ref($result), "UTF-16$bl:$result");
}
+
+
+
+Encode::Guess->set_suspects();
+for my $jp (@jp){
+ # intentionally set $1 a priori -- see Changes
+ my $test = "English";
+ '$1' =~ m/^(.*)/o;
+ is(guess_encoding($test, ($jp))->name, 'ascii',
+ "ascii vs $jp (\$1 messed)");
+ $test = encode($jp, $test . "\n\x{65e5}\x{672c}\x{8a9e}");
+ is(guess_encoding($test, ($jp))->name,
+ $jp, "$jp vs ascii (\$1 messed)");
+}
+
__END__;