Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Wide character in print at D:/Perl/lib/WWW/Mechanize.pm line 2044

37 views
Skip to first unread message

Ganesh Babu N

unread,
Oct 22, 2012, 7:31:36 AM10/22/12
to Perl
Dear All,

I am using WWW::Mechanize to fetch the content from the web. when I
used save_content method, I am getting the above said error. In the
output the character is not displaying properly. I need to encode the
HTML content to UTF-8 so that the character looks correct.

I have modified the Mechanize.pm @ line no. 2042 to open( my $fh,
'>:utf8', $filename ). But I am not getting the desired output.

Please help in getting the $mech->content in utf-8 format.

Regards,
Ganesh

Charles DeRykus

unread,
Oct 23, 2012, 4:55:51 AM10/23/12
to begi...@perl.org
Try $mech->decoded_content instead of $mech->content.

HTH,
Charles DeRykus

0 new messages