"\215" (and basically every other byte ≥128) are being replaced with
"\357\277\275".
"\357\277\275" is the UTF-8 encoding of
\x{FFFD}, the replacement character used to represent bad data.
$ perl -MEncode -e'printf "%04X\n", ord decode "UTF-8", "\357\277\275"
+'
FFFD
It sounds like something tried to decode the zip file.
$ perl -MEncode -we'print decode "UTF-8", "\215"' | od -c
Wide character in print at -e line 1.
0000000 357 277 275
0000003
While WWW::Mechanize's content calls decoded_content (defined in HTTP::Message), decoded_content shouldn't attempt to decode a zip file (only files with MIME type text/*).
Is the web server incorrectly saying the .zip is a UTF-8 text file? Could you provide the output of the following:
print $mech->response()->headers()->as_string();
Delete "Set-Cookie:" headers and other authentication data before posting.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.