Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re^2: www:mechanize mangles unicode

by red0hat (Initiate)
on Apr 28, 2010 at 21:07 UTC ( #837396=note: print w/replies, xml ) Need Help??

in reply to Re: www:mechanize mangles unicode
in thread www:mechanize mangles unicode

The headers claim:

Accept-Charset: ISO-8859-1,utf-8

and the data that is being sent is "Château". Of course, what is reading the log might be making it pretty, again.


Replies are listed 'Best First'.
Re^3: www:mechanize mangles unicode
by Corion (Pope) on Apr 28, 2010 at 21:10 UTC

    Yes, when dealing with encoding problems, you will need to make sure that all components show you the real thing. Look at the hexdumps of the parts and check that they show the octets that correspond to the respective encoding.

Re^3: www:mechanize mangles unicode
by Hue-Bond (Priest) on Apr 28, 2010 at 21:13 UTC
    and the data that is being sent is "Château".

    But, what is "Château"? How could you be sure of that? Well, use an hexdumper for that, for example vim's xxd:

    $ echo -n Château |xxd 0000000: 4368 c3a2 7465 6175 Ch..teau

    What you specifically need then, is dumping your log file:

    $ grep 'teau\b' /path/to/log |xxd |less

     David Serrano
     (Please treat my english text just like Perl code, i.e. feel free to notify me of any syntax, grammar, style and/or spelling errors. Thank you!).

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://837396]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (7)
As of 2018-06-22 20:35 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (124 votes). Check out past polls.