[issue8898] The email package should defer to the codecs module for all aliases

R. David Murray report at bugs.python.org
Mon May 23 15:43:47 CEST 2011


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

Well, it turns out that back when I opened this issue I misunderstood what the ALIASES table was used for.  it *is* used before doing a codecs lookup, but it is also used to convert whatever charset name the programmer specifies into the standard MIME name for the codec when generating emails.

Clearly the email module needs to base its transformation on the IANA table.  I think the ideal would be to have a program that pulls the IANA table and generates the ALIASES table.  On the other hand, codecs should already have all of those aliases (this theoretical program could be used to ensure that), so another alternative is to use codecs to look up the "python canonical" name for the charset, and have the email ALIASES table just map the ones where that isn't the preferred MIME name into the MIME name.

----------

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


More information about the Python-bugs-list mailing list