[issue5468] urlencode does not handle "bytes", and could easily handle alternate encodings
Jeremy Hylton
report at bugs.python.org
Thu Mar 26 21:57:51 CET 2009
Jeremy Hylton <jeremy at alum.mit.edu> added the comment:
I'm not sure I understand the part of the code that deals with binary
strings. I agree the current behavior is odd. RFC 2396 says that
non-ascii characters must be encoded as utf-8 and then percent escaped.
In the test case you started with, you encoded b'\xa0\x24'. It doesn't
seem like this should be allowed, since it is not valid utf-8.
----------
nosy: +jhylton
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5468>
_______________________________________
More information about the Python-bugs-list
mailing list