Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

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

by Purdy (Hermit)
on Jun 24, 2010 at 18:27 UTC ( #846369=note: print w/replies, xml ) Need Help??


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?...

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (4)
As of 2019-12-06 22:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Strict and warnings: which comes first?



    Results (160 votes). Check out past polls.

    Notices?