Mailing List Archive

perlio questions
Hello,

I am wondering why following does not work as expected
File encoding is in iso-8859-1


my $str = "äää";
binmode(OUT, ":utf8");
print OUT $str;

Expected result: string is output in utf.
Real result: string is still in iso-8859-1

When I write it like this

use Encode;

my $str = "äää";
Encode::from_to($str, "iso-8859-1", "utf8");
print OUT $str;

everything works as expected, that is $str is output in utf.

All the best,
Phade