[issue35222] email.utils.formataddr is not exactly the reverse of email.utils.parseaddr

Rémi Lapeyre report at bugs.python.org
Mon Nov 12 18:25:18 EST 2018


Rémi Lapeyre <remi.lapeyre at henki.fr> added the comment:

This is indeed an issue with formataddr, it expects the input to be ascii encoded as RFC 2822 requires.

Email is much more complicated though and has been internationalized, a summary of this work is available at https://en.wikipedia.org/wiki/Email_address#Internationalization.

I think the check in formataddr is not desirable anymore and should be remove.

I'm not sure wether the resulting value should be encoded using email.header or not.

----------
nosy: +remi.lapeyre

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


More information about the Python-bugs-list mailing list