Steve Dower added the comment:

I'm fairly happy with where my current patch is at (not posted right now - too 
many different machines involved) and only one test is failing - test_cgi.

The problem seems to be that urllib.parse.unquote() takes an encoding parameter 
to decode utf-8 encoded bytes with, and cgi infers this parameter from 
sys.stdin. I don't have the slightest idea why unquote/unquote_to_bytes 
unconditionally encodes with utf-8 and then allows decoding with an arbitrary 
encoding, but I guess it works okay for ASCII-compatible encodings?

Unfortunately, utf-16-le is not ASCII compatible, and so this doesn't work. I'm 
not familiar enough with cgi or urllib.parse to know what to fix - any 
suggestions?

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue1602>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to