summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2003-12-29 08:10:51 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2003-12-29 08:10:51 +0000
commitc2cbba7db7fc4081c5d985a6a15c29dded8e6709 (patch)
tree263a9b5aebae6455a42197e45fec200756a7f109
parent05e23382578645af97ac24028ac1e015aa95cf1d (diff)
downloadperl-c2cbba7db7fc4081c5d985a6a15c29dded8e6709.tar.gz
Upgrade to Encode 1.99.
p4raw-id: //depot/perl@21991
-rw-r--r--ext/Encode/Changes17
-rw-r--r--ext/Encode/Encode.pm16
-rw-r--r--ext/Encode/META.yml4
-rw-r--r--ext/Encode/Unicode/Unicode.xs4
-rw-r--r--ext/Encode/encoding.pm4
-rw-r--r--ext/Encode/t/enc_eucjp.t2
-rw-r--r--ext/Encode/t/enc_utf8.t2
-rw-r--r--ext/Encode/t/mime-header.t2
-rw-r--r--ext/Encode/ucm/gsm0338.ucm2
-rw-r--r--ext/Encode/ucm/macArabic.ucm2
-rw-r--r--ext/Encode/ucm/macFarsi.ucm2
-rw-r--r--ext/Encode/ucm/macHebrew.ucm2
12 files changed, 38 insertions, 21 deletions
diff --git a/ext/Encode/Changes b/ext/Encode/Changes
index 0ec0702b05..b034b93a66 100644
--- a/ext/Encode/Changes
+++ b/ext/Encode/Changes
@@ -1,8 +1,21 @@
# Revision history for Perl extension Encode.
#
-# $Id: Changes,v 1.98 2003/08/20 11:15:31 dankogai Exp dankogai $
+# $Id: Changes,v 1.99 2003/12/29 02:47:16 dankogai Exp dankogai $
#
-$Revision: 1.98 $ $Date: 2003/08/20 11:15:31 $
+
+$Revision: 1.99 $ $Date: 2003/12/29 02:47:16 $
+! Unicode/Unicode.xs
+ find_encoding("UTF-16BE")->encode("abc") now null terminates
+ http://www.mail-archive.com/perl5-porters@perl.org/msg69766.html
+! Encode.pm
+ prototype bug in decode_utf8() fixed
+ Message-Id: <600A4CDA-F004-11D7-B570-000393AE4244@dan.co.jp>
+! Encode.pm /MANIFEST encoding.pm lib/Encode/Supported.pod
+ t/at-cn.t t/at-tw.t t/gsm0338.t ucm/gsm0338.ucm
++ t/gsm0338.t
+ Merged from maintperl@21987
+
+1.98 2003/08/20 11:15:31
! lib/Encode/MIME/Header.pm AUTHORS t/mime-header.t
Dave Evans has found and corrected a bug in Encode::MIME::Header.
Test suite added by Dan Kogai.
diff --git a/ext/Encode/Encode.pm b/ext/Encode/Encode.pm
index 043337b885..fe1a342245 100644
--- a/ext/Encode/Encode.pm
+++ b/ext/Encode/Encode.pm
@@ -1,9 +1,9 @@
#
-# $Id: Encode.pm,v 1.98 2003/08/20 11:16:34 dankogai Exp dankogai $
+# $Id: Encode.pm,v 1.99 2003/12/29 02:47:16 dankogai Exp dankogai $
#
package Encode;
use strict;
-our $VERSION = do { my @r = (q$Revision: 1.9801 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r };
+our $VERSION = do { my @r = (q$Revision: 1.99 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r };
sub DEBUG () { 0 }
use XSLoader ();
XSLoader::load(__PACKAGE__, $VERSION);
@@ -195,11 +195,15 @@ sub encode_utf8($)
return $str;
}
-sub decode_utf8($)
+sub decode_utf8($;$)
{
- my ($str) = @_;
- return undef unless utf8::decode($str);
- return $str;
+ my ($str, $check) = @_;
+ if ($check){
+ return decode("utf8", $str, $check);
+ }else{
+ return undef unless utf8::decode($str);
+ return $str;
+ }
}
predefine_encodings(1);
diff --git a/ext/Encode/META.yml b/ext/Encode/META.yml
index 07327cecab..f14074f54e 100644
--- a/ext/Encode/META.yml
+++ b/ext/Encode/META.yml
@@ -1,10 +1,10 @@
# http://module-build.sourceforge.net/META-spec.html
#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
name: Encode
-version: 1.98
+version: 1.99
version_from: Encode.pm
installdirs: perl
requires:
distribution_type: module
-generated_by: ExtUtils::MakeMaker version 6.16
+generated_by: ExtUtils::MakeMaker version 6.21_01
diff --git a/ext/Encode/Unicode/Unicode.xs b/ext/Encode/Unicode/Unicode.xs
index 70b9a5d77c..de15da5141 100644
--- a/ext/Encode/Unicode/Unicode.xs
+++ b/ext/Encode/Unicode/Unicode.xs
@@ -1,5 +1,5 @@
/*
- $Id: Unicode.xs,v 1.8 2003/06/18 09:29:02 dankogai Exp $
+ $Id: Unicode.xs,v 1.9 2003/12/29 02:47:16 dankogai Exp dankogai $
*/
#define PERL_NO_GET_CONTEXT
@@ -54,7 +54,7 @@ enc_unpack(pTHX_ U8 **sp,U8 *e,STRLEN size,U8 endian)
void
enc_pack(pTHX_ SV *result,STRLEN size,U8 endian,UV value)
{
- U8 *d = (U8 *)SvGROW(result,SvCUR(result)+size);
+ U8 *d = (U8 *)SvGROW(result,SvCUR(result)+size+1);
switch(endian) {
case 'v':
case 'V':
diff --git a/ext/Encode/encoding.pm b/ext/Encode/encoding.pm
index 93662524fa..2edf647cde 100644
--- a/ext/Encode/encoding.pm
+++ b/ext/Encode/encoding.pm
@@ -1,6 +1,6 @@
-# $Id: encoding.pm,v 1.47 2003/08/20 11:15:31 dankogai Exp dankogai $
+# $Id: encoding.pm,v 1.48 2003/12/29 02:47:16 dankogai Exp dankogai $
package encoding;
-our $VERSION = do { my @r = (q$Revision: 1.47 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r };
+our $VERSION = do { my @r = (q$Revision: 1.48 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r };
use Encode;
use strict;
diff --git a/ext/Encode/t/enc_eucjp.t b/ext/Encode/t/enc_eucjp.t
index bbe87cfee4..111a034d99 100644
--- a/ext/Encode/t/enc_eucjp.t
+++ b/ext/Encode/t/enc_eucjp.t
@@ -1,4 +1,4 @@
-# $Id: enc_eucjp.t,v 1.5 2003/08/20 11:15:31 dankogai Exp dankogai $
+# $Id: enc_eucjp.t,v 1.5 2003/08/20 11:15:31 dankogai Exp $
# This is the twin of enc_utf8.t .
BEGIN {
diff --git a/ext/Encode/t/enc_utf8.t b/ext/Encode/t/enc_utf8.t
index 0fc1bd948d..3f6fdc76d6 100644
--- a/ext/Encode/t/enc_utf8.t
+++ b/ext/Encode/t/enc_utf8.t
@@ -1,4 +1,4 @@
-# $Id: enc_utf8.t,v 1.4 2003/08/20 11:15:31 dankogai Exp dankogai $
+# $Id: enc_utf8.t,v 1.4 2003/08/20 11:15:31 dankogai Exp $
# This is the twin of enc_eucjp.t .
BEGIN {
diff --git a/ext/Encode/t/mime-header.t b/ext/Encode/t/mime-header.t
index 06021b8a09..25438bcd0a 100644
--- a/ext/Encode/t/mime-header.t
+++ b/ext/Encode/t/mime-header.t
@@ -1,5 +1,5 @@
#
-# $Id: mime-header.t,v 1.8 2003/08/20 11:15:31 dankogai Exp dankogai $
+# $Id: mime-header.t,v 1.8 2003/08/20 11:15:31 dankogai Exp $
# This script is written in utf8
#
BEGIN {
diff --git a/ext/Encode/ucm/gsm0338.ucm b/ext/Encode/ucm/gsm0338.ucm
index 756bdbd21b..a7fe1bf7fc 100644
--- a/ext/Encode/ucm/gsm0338.ucm
+++ b/ext/Encode/ucm/gsm0338.ucm
@@ -1,5 +1,5 @@
#
-# $Id: gsm0338.ucm,v 1.0 2002/03/28 23:26:26 dankogai Exp $
+# $Id: gsm0338.ucm,v 1.1 2003/12/29 02:47:16 dankogai Exp dankogai $
#
# ./compile -n gsm0338 -o Encode/gsm0338.ucm Encode/gsm0338.enc
<code_set_name> "gsm0338"
diff --git a/ext/Encode/ucm/macArabic.ucm b/ext/Encode/ucm/macArabic.ucm
index f0a854c715..60131c79b3 100644
--- a/ext/Encode/ucm/macArabic.ucm
+++ b/ext/Encode/ucm/macArabic.ucm
@@ -1,5 +1,5 @@
#
-# $Id: macArabic.ucm,v 1.21 2003/08/20 11:15:31 dankogai Exp dankogai $
+# $Id: macArabic.ucm,v 1.21 2003/08/20 11:15:31 dankogai Exp $
#
# Original table can be obtained at
# http://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/ARABIC.TXT
diff --git a/ext/Encode/ucm/macFarsi.ucm b/ext/Encode/ucm/macFarsi.ucm
index a2918b2cd9..0986d9e6b2 100644
--- a/ext/Encode/ucm/macFarsi.ucm
+++ b/ext/Encode/ucm/macFarsi.ucm
@@ -1,5 +1,5 @@
#
-# $Id: macFarsi.ucm,v 1.21 2003/08/20 11:15:31 dankogai Exp dankogai $
+# $Id: macFarsi.ucm,v 1.21 2003/08/20 11:15:31 dankogai Exp $
#
# Original table can be obtained at
# http://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/FARSI.TXT
diff --git a/ext/Encode/ucm/macHebrew.ucm b/ext/Encode/ucm/macHebrew.ucm
index d32a07a2de..1d14cecfd3 100644
--- a/ext/Encode/ucm/macHebrew.ucm
+++ b/ext/Encode/ucm/macHebrew.ucm
@@ -1,5 +1,5 @@
#
-# $Id: macHebrew.ucm,v 1.21 2003/08/20 11:15:31 dankogai Exp dankogai $
+# $Id: macHebrew.ucm,v 1.21 2003/08/20 11:15:31 dankogai Exp $
#
# Original table can be obtained at
# http://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/HEBREW.TXT