Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^3: Parsing UTF-8 HTML w/ HTML::Parser

by ikegami (Pope)
on Jun 24, 2010 at 18:57 UTC ( #846376=note: print w/replies, xml ) Need Help??


in reply to Re^2: Parsing UTF-8 HTML w/ HTML::Parser
in thread Parsing UTF-8 HTML w/ HTML::Parser

Sounds like you didn't decode the HTML before passing it to HTML::TreeBuilder, so decode it. If this was LWP (which WWW::Mechanize derives), I'd say use ->decoded_content instead of ->content.

Replies are listed 'Best First'.
Re^4: Parsing UTF-8 HTML w/ HTML::Parser
by Purdy (Hermit) on Jun 24, 2010 at 20:22 UTC

    That helps, but I still don't understand what's going on. At this point, I have:

    my $root = HTML::TreeBuilder->new_from_content( $mech->response->d +ecoded_content );

    And that's working on the production box ... now I just want to back away slowly and hope it doesn't go all screwy on me again. ;)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://846376]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2020-01-24 09:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?