This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author amaury.forgeotdarc
Recipients amaury.forgeotdarc, barry, oopos
Date 2009-01-15.16:45:22
SpamBayes Score 0.0454237
Marked as misclassified No
Message-id <>
Thanks for the test case. I reproduced it easily.
There is indeed a real problem in CGI streams.

The first thing to do is to start python with the -u option (add it to
the end of the first #! line), so that stdin yields bytes instead of
unicode chars, and \r\n are not translated on Windows.

Even then, I noticed that in the multipart/form-data section, text
fields are utf-8 encoded, but the file content is raw binary.
(FWIW, I use Firefox and Apache on Windows)
No encoding seems to be specified, neither in the content, nor in the

And of course, the email.parser.FeedParser object used to parse it
accepts only unicode, not bytes.
Help needed.
Date User Action Args
2009-01-15 16:45:25amaury.forgeotdarcsetrecipients: + amaury.forgeotdarc, barry, oopos
2009-01-15 16:45:25amaury.forgeotdarcsetmessageid: <>
2009-01-15 16:45:24amaury.forgeotdarclinkissue4953 messages
2009-01-15 16:45:23amaury.forgeotdarccreate