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. ;)