[issue3232] Wrong str->bytes conversion in Lib/encodings/idna.py
Martin v. Löwis
report at bugs.python.org
Fri Sep 30 12:20:04 CEST 2011
Martin v. Löwis <martin at v.loewis.de> added the comment:
I agree that the codec shouldn't "decode" unicode strings. However, the operation performed is still meaningful: users may type ACE (ascii-compatibly-encoded) DNS names into a user interface, and the application may then represent this as a "proper" Unicode name.
So I propose these changes:
- remove support for bytes in codec, but only so for 3.3 (it's actually no change in behavior, since it will continue to raise TypeErrors)
- add a function decode_idna to the module, for users that wish to un-IDNA string objects.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3232>
_______________________________________
More information about the Python-bugs-list
mailing list