[issue39757] EmailMessage bad encoding for international domain

R. David Murray report at bugs.python.org
Fri Feb 28 14:07:10 EST 2020


R. David Murray <rdmurray at bitdance.com> added the comment:

This is not actually a duplicate of 11783.  Rereading (parts of) that issue, we decided we currently have no good way to do automatic conversion between unicode and internationalized domains, so the user of the library has to do it themselves.  This means that the bug *here* is that the new email API is *wrongly* encoding the non-ascii in the domain by using an encoded word.  I'm surprised at that; I thought I'd guarded against it.

What should be happening here is that an error should be raised when that header is set (or possibly when it is accessed/serialized, but when set would be better I think) saying that there is non-ascii in the domain part.

----------
resolution: duplicate -> 
stage: resolved -> needs patch
status: closed -> open
superseder: email parseaddr and formataddr should be IDNA aware -> 
title: EmailMessage wrong encoding for international domain -> EmailMessage bad encoding for international domain

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


More information about the Python-bugs-list mailing list