[issue6734] Imap lib implicit conversion from bytes to string

STINNER Victor report at bugs.python.org
Wed Aug 19 23:29:45 CEST 2009

STINNER Victor <victor.stinner at haypocalc.com> added the comment:

IMAP4 protocol uses bytes, not characters. There is no "standard
charset", so you have to encode (manually) your login and password as
bytes. login method prototype:
  IMAP4.login(login: bytes, password: bytes)

You server may use UTF-8, but another server may use ISO-8859-1 or any
other charset.

The documentation should explain why the Python library uses bytes and
not "simply" characters.


Python tracker <report at bugs.python.org>

More information about the Python-bugs-list mailing list