[issue22833] The decode_header() function decodes raw part to bytes or str, depending on encoded part

py.user report at bugs.python.org
Mon Nov 10 22:17:38 CET 2014


py.user added the comment:

R. David Murray wrote:
"Is there a reason you are choosing not to use the new API?"

My program is for Python 3.x. I need to decode wild headers to pretty unicode strings. Now, I do it by decode_header() and try...except for AttributeError, since a unicode string has no .decode() method.

I don't know what is "new API", but I guess it's not compatible with Python 3.0.

----------

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


More information about the Python-bugs-list mailing list