'Encode' =>
{
'MAINTAINER' => 'dankogai',
- 'DISTRIBUTION' => 'DANKOGAI/Encode-2.37.tar.gz',
+ 'DISTRIBUTION' => 'DANKOGAI/Encode-2.38.tar.gz',
'FILES' => q[cpan/Encode],
'CPAN' => 1,
'UPSTREAM' => undef,
Bjoern Hoehrmann <derhoermi@gmx.net>
Bjoern Jacke <debianbugs@j3e.de>
Chris Nandor <pudge@pobox.com>
-Curtis Jewell <csjewell@cpan.org>
Craig A. Berry <craigberry@mac.com>
+Curtis Jewell <csjewell@cpan.org>
Dan Kogai <dankogai@dan.co.jp>
Dave Evans <dave@rudolf.org.uk>
Deng Liu <dengliu@ntu.edu.tw>
Dominic Dunlop <domo@computer.org>
Elizabeth Mattijsen <liz@dijkmat.nl>
Gerrit P. Haase <gp@familiehaase.de>
+Gisle Aas <gisle@ActiveState.com>
Graham Barr <gbarr@pobox.com>
Gurusamy Sarathy <gsar@activestate.com>
H.Merijn Brand <h.m.brand@xs4all.nl>
Steve Peters <steve@fisharerojo.org>
Tatsuhiko Miyagawa <miyagawa@bulknews.net>
Tels <perl_dummy@bloodgate.com>
+Tony Cook <tony@develop-help.com>
Vadim Konovalov <vkonovalov@peterstar.ru>
Yitzchak Scott-Thoennes <sthoenna@efn.org>
use strict;
use warnings;
use Encode;
-our $VERSION = do { my @r = ( q$Revision: 2.3 $ =~ /\d+/g ); sprintf "%d." . "%02d" x $#r, @r };
+our $VERSION = do { my @r = ( q$Revision: 2.4 $ =~ /\d+/g ); sprintf "%d." . "%02d" x $#r, @r };
use XSLoader;
XSLoader::load( __PACKAGE__, $VERSION );
viscii
# all cp* are also available as ibm-*, ms-*, and windows-*
- # also see L<http://msdn.microsoft.com/workshop/author/dhtml/reference/charsets/charset4.asp>
+ # also see L<http://msdn.microsoft.com/en-us/library/aa752010%28VS.85%29.aspx>
cp424
cp437
use strict;
use warnings;
use Encode;
-our $VERSION = do { my @r = ( q$Revision: 2.2 $ =~ /\d+/g ); sprintf "%d." . "%02d" x $#r, @r };
+our $VERSION = do { my @r = ( q$Revision: 2.3 $ =~ /\d+/g ); sprintf "%d." . "%02d" x $#r, @r };
use XSLoader;
XSLoader::load( __PACKAGE__, $VERSION );
Use C<gb2312-raw> when you really mean it.
The ASCII region (0x00-0x7f) is preserved for all encodings, even though
-this conflicts with mappings by the Unicode Consortium. See
-
-L<http://www.debian.or.jp/~kubota/unicode-symbols.html.en>
-
-to find out why it is implemented that way.
+this conflicts with mappings by the Unicode Consortium.
=head1 SEE ALSO
# Revision history for Perl extension Encode.
#
-# $Id: Changes,v 2.37 2009/09/06 14:32:21 dankogai Exp dankogai $
-$Revision: 2.37 $ $Date: 2009/09/06 14:32:21 $
+# $Id: Changes,v 2.38 2009/11/16 14:08:13 dankogai Exp dankogai $
+$Revision: 2.38 $ $Date: 2009/11/16 14:08:13 $
+! Encode.xs
+ Addressed: Encode memory corruption [perl #70528]
+ Message-Id: <alpine.LFD.2.00.0911152328070.9483@ein.m-l.org>
+! t/Unicode.t Unicode/Unicode.xs
+ Patched: #51263: set magic is not applied when modifying encode arguments
+ http://rt.cpan.org/Ticket/Display.html?id=51263
+! Encode.xs
+ Patched: #51204: Callback CHECK not supported for UTF-8 decoder/encoder
+ http://rt.cpan.org/Ticket/Display.html?id=51204
+! Byte/Byte.pm CN/CN.pm Changes JP/JP.pm KR/KR.pm TW/TW.pm
+ Unicode/Unicode.pm bin/enc2xs lib/Encode/Supported.pod
+ Fix URLs
+ http://rt.cpan.org/Ticket/Display.html?id=49776
+! t/CJKT.t t/guess.t t/perlio.t t/piconv.t
+ $PERL_CORE trick is now off for perl 5.11 or better.
+ Message-Id: <b77c1dce0909070245s59b294bq8a8a8166e7342793@mail.gmail.com>
+ Message-Id: <E7FADA6C-D5A7-4ECA-BE4C-85911A97677E@dan.co.jp>
+ Message-Id: <20090907154908.GS60303@plum.flirble.org>
+ Message-Id: <20090907161509.GN8057@iabyn.com>
+
+2.37 2009/09/06 14:32:21
! Encode.xs
fixed: compilation failure on compilers not supporting C99
http://rt.cpan.org/Ticket/Display.html?id=49466
-2.37 2009/09/06 09:03:07
+2.36 2009/09/06 09:03:07
! Encode.xs
fixed: 'find_encoding("utf8")->decode(undef)' causes segmentation fault
http://rt.cpan.org/Ticket/Display.html?id=49462
1.99 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
+ http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2003-10/threads.html#00258
! Encode.pm
prototype bug in decode_utf8() fixed
Message-Id: <600A4CDA-F004-11D7-B570-000393AE4244@dan.co.jp>
#
-# $Id: Encode.pm,v 2.37 2009/09/06 14:30:32 dankogai Exp $
+# $Id: Encode.pm,v 2.38 2009/11/16 14:08:01 dankogai Exp $
#
package Encode;
use strict;
use warnings;
-our $VERSION = sprintf "%d.%02d", q$Revision: 2.37 $ =~ /(\d+)/g;
+our $VERSION = sprintf "%d.%02d", q$Revision: 2.38 $ =~ /(\d+)/g;
sub DEBUG () { 0 }
use XSLoader ();
XSLoader::load( __PACKAGE__, $VERSION );
/*
- $Id: Encode.xs,v 2.16 2009/09/06 14:32:21 dankogai Exp dankogai $
+ $Id: Encode.xs,v 2.17 2009/11/16 14:08:13 dankogai Exp dankogai $
*/
#define PERL_NO_GET_CONTEXT
{
dSP;
int argc;
- SV *temp, *retval;
+ SV *retval = newSVpv("",0);
ENTER;
SAVETMPS;
PUSHMARK(sp);
if (argc != 1){
croak("fallback sub must return scalar!");
}
- temp = newSVsv(POPs);
+ sv_catsv(retval, POPs);
PUTBACK;
FREETMPS;
LEAVE;
- retval = newSVpv("",0);
- sv_catsv(retval, temp);
- SvREFCNT_dec(temp);
return retval;
}
: newSVpvf(check & ENCODE_PERLQQ ? "\\x{%04"UVxf"}" :
check & ENCODE_HTMLCREF ? "&#%" UVuf ";" :
"&#x%" UVxf ";", (UV)ch);
+ SvUTF8_off(subchar); /* make sure no decoded string gets in */
sdone += slen + clen;
ddone += dlen + SvCUR(subchar);
sv_catsv(dst, subchar);
PROTOTYPES: DISABLE
void
-Method_decode_xs(obj,src,check = 0)
+Method_decode_xs(obj,src,check_sv = &PL_sv_no)
SV * obj
SV * src
-int check
+SV * check_sv
PREINIT:
STRLEN slen;
U8 *s;
U8 *e;
SV *dst;
bool renewed = 0;
+ int check;
CODE:
{
dSP; ENTER; SAVETMPS;
+ if (SvROK(check_sv)) {
+ croak("UTF-8 decoder doesn't support callback CHECK");
+ }
+ else {
+ check = SvIV(check_sv);
+ }
if (src == &PL_sv_undef) src = newSV(0);
s = (U8 *) SvPV(src, slen);
e = (U8 *) SvEND(src);
}
void
-Method_encode_xs(obj,src,check = 0)
+Method_encode_xs(obj,src,check_sv = &PL_sv_no)
SV * obj
SV * src
-int check
+SV * check_sv
PREINIT:
STRLEN slen;
U8 *s;
U8 *e;
SV *dst;
bool renewed = 0;
+ int check;
CODE:
{
+ if (SvROK(check_sv)) {
+ croak("UTF-8 encoder doesn't support callback CHECK");
+ }
+ else {
+ check = SvIV(check_sv);
+ }
if (src == &PL_sv_undef) src = newSV(0);
s = (U8 *) SvPV(src, slen);
e = (U8 *) SvEND(src);
use strict;
use warnings;
use Encode;
-our $VERSION = do { my @r = ( q$Revision: 2.3 $ =~ /\d+/g ); sprintf "%d." . "%02d" x $#r, @r };
+our $VERSION = do { my @r = ( q$Revision: 2.4 $ =~ /\d+/g ); sprintf "%d." . "%02d" x $#r, @r };
use XSLoader;
XSLoader::load( __PACKAGE__, $VERSION );
=head1 BUGS
The ASCII region (0x00-0x7f) is preserved for all encodings, even
-though this conflicts with mappings by the Unicode Consortium. See
-
-L<http://www.debian.or.jp/~kubota/unicode-symbols.html.en>
-
-to find out why it is implemented that way.
+though this conflicts with mappings by the Unicode Consortium.
=head1 SEE ALSO
use strict;
use warnings;
use Encode;
-our $VERSION = do { my @r = ( q$Revision: 2.2 $ =~ /\d+/g ); sprintf "%d." . "%02d" x $#r, @r };
+our $VERSION = do { my @r = ( q$Revision: 2.3 $ =~ /\d+/g ); sprintf "%d." . "%02d" x $#r, @r };
use XSLoader;
XSLoader::load( __PACKAGE__, $VERSION );
qr/ks_c_5601-1987$/i => '"cp949"'
The ASCII region (0x00-0x7f) is preserved for all encodings, even
-though this conflicts with mappings by the Unicode Consortium. See
-
-L<http://www.debian.or.jp/~kubota/unicode-symbols.html.en>
-
-to find out why it is implemented that way.
+though this conflicts with mappings by the Unicode Consortium.
=head1 SEE ALSO
--- #YAML:1.0
name: Encode
-version: 2.37
+version: 2.38
abstract: ~
author: []
license: unknown
directory:
- t
- inc
-generated_by: ExtUtils::MakeMaker version 6.54
+generated_by: ExtUtils::MakeMaker version 6.55_02
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
version: 1.4
use strict;
use warnings;
use Encode;
-our $VERSION = do { my @r = ( q$Revision: 2.2 $ =~ /\d+/g ); sprintf "%d." . "%02d" x $#r, @r };
+our $VERSION = do { my @r = ( q$Revision: 2.3 $ =~ /\d+/g ); sprintf "%d." . "%02d" x $#r, @r };
use XSLoader;
XSLoader::load( __PACKAGE__, $VERSION );
planes 1-7.
The ASCII region (0x00-0x7f) is preserved for all encodings, even
-though this conflicts with mappings by the Unicode Consortium. See
-
-L<http://www.debian.or.jp/~kubota/unicode-symbols.html.en>
-
-to find out why it is implemented that way.
+though this conflicts with mappings by the Unicode Consortium.
=head1 SEE ALSO
use warnings;
no warnings 'redefine';
-our $VERSION = do { my @r = ( q$Revision: 2.6 $ =~ /\d+/g ); sprintf "%d." . "%02d" x $#r, @r };
+our $VERSION = do { my @r = ( q$Revision: 2.7 $ =~ /\d+/g ); sprintf "%d." . "%02d" x $#r, @r };
use XSLoader;
XSLoader::load( __PACKAGE__, $VERSION );
L<Encode>, L<Encode::Unicode::UTF7>, L<http://www.unicode.org/glossary/>,
L<http://www.unicode.org/unicode/faq/utf_bom.html>,
-RFC 2781 L<http://rfc.net/rfc2781.html>,
+RFC 2781 L<http://www.ietf.org/rfc/rfc2781.txt>,
The whole Unicode standard L<http://www.unicode.org/unicode/uni2book/u2.html>
/*
- $Id: Unicode.xs,v 2.5 2009/02/01 13:14:41 dankogai Exp $
+ $Id: Unicode.xs,v 2.6 2009/11/16 14:08:13 dankogai Exp dankogai $
*/
#define PERL_NO_GET_CONTEXT
if (!temp_result)
shrink_buffer(result);
+ SvSETMAGIC(utf8);
+
XSRETURN(1);
}
use Getopt::Std;
use Config;
my @orig_ARGV = @ARGV;
-our $VERSION = do { my @r = (q$Revision: 2.6 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r };
+our $VERSION = do { my @r = (q$Revision: 2.7 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r };
# These may get re-ordered.
# RAW is a do_now as inserted by &enter
=item *
ICU Character Mapping Tables
-L<http://www.icu-project.org/charset/>
+L<http://site.icu-project.org/charts/charset>
=item *
it is beyond the power of words to describe the way HTML browsers
encode non-C<ASCII> form data. To get a general impression, visit
-L<http://ppewww.ph.gla.ac.uk/~flavell/charset/form-i18n.html>.
+L<http://www.alanflavell.org.uk/charset/form-i18n.html>.
While encoding of form data has stabilized for C<UTF-8> encoded pages
(at least IE 5/6, NS 6, and Opera 6 behave consistently), be sure to
expect fun (and cross-browser discrepancies) with C<UTF-16> encoded
=item RFC
Request For Comments -- need I say more?
-L<http://www.rfc-editor.org/>, L<http://www.rfc.net/>,
+L<http://www.rfc-editor.org/>, L<http://www.ietf.org/rfc.html>,
L<http://www.faqs.org/rfcs/>
=item UC
=item CJK.inf
-L<http://www.oreilly.com/people/authors/lunde/cjk_inf.html>
+L<http://examples.oreilly.com/cjkvinfo/doc/cjk.inf>
Somewhat obsolete (last update in 1996), but still useful. Also try
information processing.
To purchase this book, visit
-L<http://www.oreilly.com/catalog/cjkvinfo/>
+L<http://oreilly.com/catalog/9780596514471/>
or your favourite bookstore.
=back
BEGIN {
+ if ( $ENV{'PERL_CORE'} && $] >= 5.011) {
+ chdir 't';
+ unshift @INC, '../lib';
+ }
require Config; import Config;
if ($Config{'extensions'} !~ /\bEncode\b/) {
print "1..0 # Skip: Encode was not built\n";
#
-# $Id: Unicode.t,v 2.1 2006/05/03 18:24:10 dankogai Exp $
+# $Id: Unicode.t,v 2.2 2009/11/16 14:08:13 dankogai Exp dankogai $
#
# This script is written entirely in ASCII, even though quoted literals
# do include non-BMP unicode characters -- Are you happy, jhi?
use strict;
#use Test::More 'no_plan';
-use Test::More tests => 37;
-use Encode qw(encode decode);
+use Test::More tests => 38;
+use Encode qw(encode decode find_encoding);
#
# see
is(decode("UTF-7", encode("UTF-7", $content)), $content,
"UTF-7 RT:$file");
}
+
+# Magic
+{
+ # see http://rt.perl.org/rt3//Ticket/Display.html?id=60472
+ my $work = chr(0x100);
+ my $encoding = find_encoding("UTF16-BE");
+ my $tied;
+ tie $tied, SomeScalar => \$work;
+ my $result = $encoding->encode($tied, 1);
+ is($work, "", "check set magic was applied");
+}
+
+package SomeScalar;
+use Tie::Scalar;
+use vars qw(@ISA);
+BEGIN { @ISA = 'Tie::Scalar' }
+
+sub TIESCALAR {
+ my ($class, $ref) = @_;
+ return bless $ref, $class;
+}
+
+sub FETCH {
+ ${$_[0]}
+}
+
+sub STORE {
+ ${$_[0]} = $_[1];
+}
+
1;
__END__
BEGIN {
+ if ( $ENV{'PERL_CORE'} && $] >= 5.011) {
+ chdir 't';
+ unshift @INC, '../lib';
+ }
require Config; import Config;
if ($Config{'extensions'} !~ /\bEncode\b/) {
print "1..0 # Skip: Encode was not built\n";
BEGIN {
+ if ( $ENV{'PERL_CORE'} && $] >= 5.011) {
+ chdir 't';
+ unshift @INC, '../lib';
+ }
require Config; import Config;
if ($Config{'extensions'} !~ /\bEncode\b/) {
print "1..0 # Skip: Encode was not built\n";
#
-# $Id: piconv.t,v 0.2 2009/07/13 00:50:52 dankogai Exp $
+# $Id: piconv.t,v 0.3 2009/11/16 14:08:13 dankogai Exp dankogai $
#
+BEGIN {
+ if ( $ENV{'PERL_CORE'} && $] >= 5.011) {
+ print "1..0 # Skip: Don't know how to test this within perl's core\n";
+ exit 0;
+ }
+}
+
use strict;
-use Config;
use FindBin;
use File::Spec;
use IPC::Open3 qw(open3);
use IO::Select;
use Test::More;
-my $nofork = ! $Config{d_fork};
+my $WIN = $^O eq 'MSWin32';
-if ($nofork) {
+if ($WIN) {
eval { require IPC::Run; IPC::Run->VERSION(0.83); 1; } or
- plan skip_all => 'Without fork(), we require IPC::Run 0.83 to complete this test';
+ plan skip_all => 'Win32 environments require IPC::Run 0.83 to complete this test';
}
sub run_cmd (;$$);
File::Spec->rel2abs(
File::Spec->catdir( $FindBin::RealBin, File::Spec->updir, 'blib' ) );
my $script = File::Spec->catdir($blib, 'script', 'piconv');
-my @base_cmd = ( $^X, ($ENV{PERL_CORE} ? () : "-Mblib=$blib"), $script );
+my @base_cmd = ( $^X, "-Mblib=$blib", $script );
plan tests => 5;
{
my ( $st, $out, $err ) = run_cmd;
is( $st, 0, 'status for usage call' );
- is( $out, $nofork ? undef : '' );
+ is( $out, $WIN ? undef : '' );
like( $err, qr{^piconv}, 'usage' );
}
my $err = "x" x 10_000;
$err = "";
- if ($nofork) {
+ if ($WIN) {
IPC::Run->import(qw(run timeout));
my @cmd;
if (defined $args) {