in reply to Problem while using WWW::Mechanize module for getting html
$mech->content is a shortcut for $mech->response->content which is the raw bytes returned from the web server. See HTTP::Response for details; decoded_content applies any character encoding declared in the headers.
—EDIT—
So actually, $mech->content should be giving you decoded_content. I think I misunderstood the problem.
When I run your example program, I get the same result as marto. It prints html, and there is no gzip data that I see, and only a little bit of Korean text that could possibly run into encoding issues. If it displays garbled gzip bytes for you, the there must be some problem with your perl environment, or a locale setting that is breaking things somehow? Are you accessing it through an HTTP proxy?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Problem while using WWW::Mechanize module for getting html
by Anonymous Monk on Mar 05, 2020 at 02:16 UTC |