perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Villu Roogna" <realm...@gmail.com>
Subject perlio questions
Date Sun, 11 Jun 2006 10:44:23 GMT
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

Mime
View raw message