in reply to wrong encoding using WWW::Mechanize
Sounds like you are receiving UTF-16 and treating each byte as a character. Try changing
print OUTFILE $mech->response->content();
to
print OUTFILE $mech->response->decoded_content();
If that doesn't work, you'll need to decode it yourself (probably with decode 'UTF-16', but decode 'UTF-16le' or decode 'UTF-16be' may be necessary).
If Spreadsheet::WriteExcel doesn't encode it for you, you'll need to encode the data you place in Excel. I don't know which encoding it expects.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: wrong encoding using WWW::Mechanize
by Lawliet (Curate) on Jan 24, 2009 at 19:27 UTC | |
by ikegami (Patriarch) on Jan 24, 2009 at 20:07 UTC |