Subject: | Encode 2.40's decode() Looses Data |
Date: | Sun, 19 Sep 2010 00:52:33 -0700 |
To: | bug-encode [...] rt.cpan.org |
From: | "David E. Wheeler" <dwheeler [...] cpan.org> |
With Encode 2.40, this script:
use Encode;
my @foo = ('Some UTF-8: ö');
for (@foo) {
print STDERR "Before: $_\n";
Encode::decode_utf8($_, Encode::FB_CROAK());
print STDERR "After: $_\n";
}
Outputs:
Before: Some UTF-8: ö
After:
Note how decode_utf8() has blown away the value. This did not happen with Encode 2.39. I just downgraded and now the script properly outputs:
Before: Some UTF-8: ö
After: Some UTF-8: ö
Thanks,
David