[issue29750] smtplib doesn't handle unicode passwords

Tal Einat report at bugs.python.org
Thu Jun 14 02:36:30 EDT 2018


Tal Einat <taleinat at gmail.com> added the comment:

It would be extremely helpful to have some test cases that actually work for users but fail with smtplib.  So far we have no actual examples, likely due to these being passwords.

> Note: it is definitely the case, regardless of what the RFC says, that binary passwords need to be supported.

I'm not sure what you mean by "binary".  Do you mean 8-bit characters, a.k.a. bytes?

> utf-8 should probably be used as the default encoding for string passwords, rather than ascii.

It is also possible that the appropriate encoding here is "latin1" a.k.a. ISO-8859-1 encoding.  This specifically includes many specialized versions of latin characters, e.g. those with German umlauts as mentioned in the duplicate issue #33741.  And it could even be the very common Windows-1252 encoding: "It is probably the most-used 8-bit character encoding in the world." (Wikipedia)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue29750>
_______________________________________


More information about the Python-bugs-list mailing list