[New-bugs-announce] [issue3232] Wrong str->bytes conversion in Lib/encodings/idna.py

Antoine Pitrou report at bugs.python.org
Sun Jun 29 03:03:32 CEST 2008


New submission from Antoine Pitrou <pitrou at free.fr>:

Lib/encodings/idna.py claims to do the following when `input` is a
string object (lines 183-184, and see comment line 178: "IDNA allows
decoding to operate on Unicode strings, too"):

            # Force to bytes
            input = bytes(input)

This is obviously wrong, lacking an encoding parameter. It doesn't seem
to be covered in the test suite, and I don't know what the proper
semantics should be, so I leave it to someone else to find a fix.

----------
components: Library (Lib), Unicode
messages: 68931
nosy: pitrou
severity: normal
status: open
title: Wrong str->bytes conversion in Lib/encodings/idna.py
type: behavior
versions: Python 3.0

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3232>
_______________________________________


More information about the New-bugs-announce mailing list