[issue4770] binascii module, crazy error messages, unexpected behavior

Marc-Andre Lemburg report at bugs.python.org
Mon Dec 14 22:55:13 CET 2009


Marc-Andre Lemburg <mal at egenix.com> added the comment:

The email interface ate part of the code snippet. Here's the complete
version:

>>> import base64
>>> base64.b64decode('äöü'.encode('raw-unicode-escape'))
b''
>>> base64.b64decode('äöü'.encode('ascii'))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
UnicodeEncodeError: 'ascii' codec can't encode characters in position
0-2: ordinal not in range(128)

----------

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


More information about the Python-bugs-list mailing list