Glenn Linderman <v+pyt...@g.nevcal.com> added the comment: In my previous message I quoted Pierre rightly cautioning about headers containing non-ASCII... and that BytesFeedParser doesn't, so using it to parse headers may be questionable.
So I decided to try one... I show the Live HTTP headers below, from a simple upload form. What is not so simple is the filename of the file to be uploaded... it contains a couple non-ASCII characters... in fact, one of them is non-latin-1 also: "foöţ.html". It rather seems that Firefox provides the filename in UTF-8, although Live HTTP headers seems to have displayed it using Latin-1 on the screen! But in saving it to a file, it didn't write a BOM, and the byte sequence for the filename is definitely UTF-8, and pasted here to be viewed correctly. So my question: where does Firefox get its authority to encode the filename using UTF-8 ??? User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 115 Connection: keep-alive Referer: http://rkivs.com.gl:8032/row/test.html Content-Type: multipart/form-data; boundary=---------------------------207991835220448 Content-Length: 304 -----------------------------207991835220448 Content-Disposition: form-data; name="submit" upload -----------------------------207991835220448 Content-Disposition: form-data; name="pre"; filename="foöţ.html" Content-Type: text/html aoheutns -----------------------------207991835220448-- ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue4953> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com