},
'Encode' => {
- 'DISTRIBUTION' => 'DANKOGAI/Encode-2.55.tar.gz',
+ 'DISTRIBUTION' => 'DANKOGAI/Encode-2.56.tar.gz',
'FILES' => q[cpan/Encode],
},
package Encode;
use strict;
use warnings;
-our $VERSION = sprintf "%d.%02d", q$Revision: 2.55 $ =~ /(\d+)/g;
+our $VERSION = sprintf "%d.%02d", q$Revision: 2.56 $ =~ /(\d+)/g;
use constant DEBUG => !!$ENV{PERL_ENCODE_DEBUG};
use XSLoader ();
XSLoader::load( __PACKAGE__, $VERSION );
sub decode_utf8($;$) {
my ( $octets, $check ) = @_;
return undef unless defined $octets;
- $octets .= '' if ref $octets;
+ $octets .= '';
$check ||= 0;
$utf8enc ||= find_encoding('utf8');
my $string = $utf8enc->decode( $octets, $check );
my @source = qw(ascii iso8859-1 cp1250);
my @destiny = qw(cp1047 cp37 posix-bc);
my @ebcdic_sets = qw(cp1047 cp37 posix-bc);
-plan test => 38+$n*@encodings + 2*@source*@destiny*@character_set + 2*@ebcdic_sets*256 + 6 + 4;
+plan test => 38+$n*@encodings + 2*@source*@destiny*@character_set + 2*@ebcdic_sets*256 + 6 + 5;
my $str = join('',map(chr($_),0x20..0x7E));
my $cpy = $str;
ok(length($str),from_to($cpy,'iso8859-1','Unicode'),"Length Wrong");
ok(decode(latin1 => Encode::Dummy->new("foobar")), "foobar");
ok(encode(utf8 => Encode::Dummy->new("foobar")), "foobar");
+# RT#91569
+# decode_utf8 with non-string arguments
+ok(decode_utf8(*1), "*main::1");
+
# hash keys
my $key = (keys %{{ "whatever\x{100}" => '' }})[0];
my $kopy = $key;