http://www.perlmonks.org?node_id=846369


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

Thanks, Your Mother! :)

I used your explanation to get my code fixed and it worked on my development box, but when I rolled the code out to production, it still double-encoded it. For simplicity's sake, I took the example code you provided and ran it on both servers and I get different results. Both servers have the same version of Perl (5.8.8) and the same versions of WWW::Mech (1.22), HTML::TreeBuilder (3.23), HTML::Parser (3.65) and Encode (2.12).

Development Server:

$ perl /tmp/test.pl
Chicagoland and Northwest Indiana McDonald’s® Offer a Free Taste of McCafé at the Taste of Chicago

Production Server:

$ perl /tmp/test.pl
Chicagoland and Northwest Indiana McDonaldâs® Offer a Free Taste of McCafĂ© at the Taste of Chicago

What am I missing?

Thanks!

  • Comment on Re^2: Parsing UTF-8 HTML w/ HTML::Parser

Replies are listed 'Best First'.
Re^3: Parsing UTF-8 HTML w/ HTML::Parser
by Anonymous Monk on Jun 25, 2010 at 02:40 UTC
    What am I missing?

    do you use open? set PERLIO?...