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 Olivier.Le.Moign
Recipients Olivier.Le.Moign, ezio.melotti, vstinner
Date 2016-03-10.11:04:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1457607871.95.0.782640087152.issue26527@psf.upfronthosting.co.za>
In-reply-to
Content
According to RFC5987 (http://tools.ietf.org/html/rfc5987), it's possible to use other encoding than ASCII in header fields. 
Specifically in the CGI library, posting files with non-ASCII characters will lead the header to be (for example) filename*=utf-8"xxxxx" which is not recognised:

l 513

if 'filename' in pdict:
    self.filename = pdict['filename']
self._binary_file = self.filename is not None 

The file will thus be treated as a string.
The correction isn't too big but being a total newbie, I'm a bit scared to suggest a patch.
History
Date User Action Args
2016-03-10 11:04:31Olivier.Le.Moignsetrecipients: + Olivier.Le.Moign, vstinner, ezio.melotti
2016-03-10 11:04:31Olivier.Le.Moignsetmessageid: <1457607871.95.0.782640087152.issue26527@psf.upfronthosting.co.za>
2016-03-10 11:04:31Olivier.Le.Moignlinkissue26527 messages
2016-03-10 11:04:31Olivier.Le.Moigncreate