How to handle UTF16 warning in Perl Mechanize call
问题 I get error while making mechanize call to websites having utf16 characters using mechanize in perl. It shows me this warning Parsing of undecoded UTF-16 at /usr/local/share/perl5/LWP/UserAgent.pm line 600 I know that this is generated when I call $mech->content() method. Is there a way to ignore these warnings in content method of mechanize? 回答1: Yes, you could ignore warnings like this: { no warnings; #your code that generate false warnings }; You could solve the encoding errors with this,