Even if it somehow had the wrong encoding, isn't it strange that some of the output is correct and some is not?
Anyway, the terminal is utf8 and I was surprised to see that binmode STDOUT, ':encoding(UTF-8)' actually made it worse:
foo
foo with an –
some latin1 encoded chars: æøå ÆØÅ
same, but this time whith an – .. æøå ÆØÅ
same, but this thime with an ” instead .. : æøå ÆØÃ
+3;
$VAR1 = {
'p' => [
'foo',
"foo with an \x{2013}",
'some latin1 encoded chars: æøå ÆØÃ&
+#133;',
"same, but this time whith an \x{2013} .. \x{c3}\x{
+a6}\x{c3}\x{b8}\x{c3}\x{a5} \x{c3}\x{86}\x{c3}\x{98}\x{c3}\x{85}",
"same, but this thime with an \x{201d} instead .. :
+ \x{c3}\x{a6}\x{c3}\x{b8}\x{c3}\x{a5} \x{c3}\x{86}\x{c3}\x{98}\x{c3}\
+x{85}"
]
};
|