RE: utf8, japanese, web-pages, the horror, the horror...

[email protected] ("Edward Batutis")
Newsgroups perl.unicode
Message-ID <[email protected]>
Marco:

I think you are converting twice:

> # output will be utf8
> binmode(STDOUT, ":utf8");
>...
>                 from_to($html_text,$charset,"utf8");
>...

Here, it will convert html_text to utf-8 again because of binmode with
utf-8:

>                 print "CURRENT URL $url\n$html_text\n";

I think you can just remove the binmode line and it will work.

>Why do encodings always cause so much pain?

I hope this helps today's pain, at least :-).

Regards,

=Ed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.