Issue 26527: CGI library - Using unicode in header fields (original) (raw)
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.