CC: | zmughal [...] cpan.org |
Subject: | Regression in decode_utf8 |
Hello,
I believe I have come across a regression in the decode_utf8 function. I have
attached the output of different versions of Encode along with an example.
Cheers,
- Zaki Mughal
Subject: | encoding-problem.pl |
#!/usr/bin/env perl
use strict;
use Encode qw(decode_utf8 decode);
binmode STDOUT, ":encoding(UTF-8)";
print "$^V : $Encode::VERSION\n";
print decode_utf8("\x{0ED5}\x{0ED7}\x{0ED6}"), "\n";
__END__
__OUTPUT__
perl-5.16.3
==========
v5.16.3 : 2.44_01
à»à»à»
perl-5.16.3
==========
v5.16.3 : 2.51
à»à»à»
perl-5.16.3
==========
Cannot decode string with wide characters at /home/zaki/.perlbrew/libs/perl-5.16.3@encode-2.55/lib/perl5/x86_64-linux/Encode.pm line 215.
v5.16.3 : 2.55
Command [perl encoding-problem.pl] terminated with exit code 25 ($? = 6400) under the following perl environment:
Command terminated with non-zero status.
Current perl:
Name: perl-5.16.3@encode-2.55
Path: /home/zaki/perl5/perlbrew/perls/perl-5.16.3/bin/perl
Config: -de -Dprefix=/home/zaki/perl5/perlbrew/perls/perl-5.16.3 -Aeval:scriptdir=/home/zaki/perl5/perlbrew/perls/perl-5.16.3/bin
Compiled at: Mar 16 2013 16:39:59
perlbrew:
version: 0.66
ENV:
PERLBREW_ROOT: /home/zaki/perl5/perlbrew
PERLBREW_HOME: /home/zaki/.perlbrew
PERLBREW_PATH: /home/zaki/.perlbrew/libs/perl-5.16.3@encode-2.55/bin:/home/zaki/perl5/perlbrew/bin:/home/zaki/perl5/perlbrew/perls/perl-5.16.3/bin
PERLBREW_MANPATH: /home/zaki/.perlbrew/libs/perl-5.16.3@encode-2.55/man:/home/zaki/perl5/perlbrew/perls/perl-5.16.3/man
perl-5.16.3
==========
Cannot decode string with wide characters at /home/zaki/.perlbrew/libs/perl-5.16.3@junk/lib/perl5/x86_64-linux/Encode.pm line 215.
v5.16.3 : 2.56
Command [perl encoding-problem.pl] terminated with exit code 25 ($? = 6400) under the following perl environment:
Command terminated with non-zero status.
Current perl:
Name: perl-5.16.3@junk
Path: /home/zaki/perl5/perlbrew/perls/perl-5.16.3/bin/perl
Config: -de -Dprefix=/home/zaki/perl5/perlbrew/perls/perl-5.16.3 -Aeval:scriptdir=/home/zaki/perl5/perlbrew/perls/perl-5.16.3/bin
Compiled at: Mar 16 2013 16:39:59
perlbrew:
version: 0.66
ENV:
PERLBREW_ROOT: /home/zaki/perl5/perlbrew
PERLBREW_HOME: /home/zaki/.perlbrew
PERLBREW_PATH: /home/zaki/.perlbrew/libs/perl-5.16.3@junk/bin:/home/zaki/perl5/perlbrew/bin:/home/zaki/perl5/perlbrew/perls/perl-5.16.3/bin
PERLBREW_MANPATH: /home/zaki/.perlbrew/libs/perl-5.16.3@junk/man:/home/zaki/perl5/perlbrew/perls/perl-5.16.3/man