Martin Panter added the comment:

I think this CGI thing is a separate bug, just exacerbated by the 
stdin.encoding problem. :) The urllib.parse.parse_qs() function takes an 
encoding parameter to figure out what to do with percent-encoded values: "%A9" 
→ b"\xA9".decode(...). This is different lower-level encoding: 
b"%A9".decode("ascii").

Maybe the best solution is just to remove the encoding argument, and let it 
revert to UTF-8, as it did before r87998. Or maybe it really should use the 
locale encoding. (Is that ASCII-compatible on Windows?) It really depends on 
where the query string was generated (in a browser, pre-computed URL, etc).

----------

_______________________________________
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