R. David Murray added the comment:

Thanks for the response, but I do not believe that this is a bug.

The python3 email package will decode the headers automatically if you use the 
new policies, so if you iterate through the headers, you'll get the decoded 
versions, with access to the parms dict for each.  (For custom headers you will 
have to register the appropriate header parser, but it should automatically 
handle all the standard mime headers.)

For the compat32 policy (which is the default), there is indeed no easy way to 
do the same, but that isn't a bug, because any header that contains parameters 
(MIME headers) is supposed to be unique.

As for the stackoverflow question, see above for the RFC 2231 issue (the 
headers are unique).  For doing RFC 2047, decode_header does that.  With the 
compat32 policy it is awkward, but documented, how to apply the functions in 
the header submodule to decode an arbitrary string.  For the new policies you 
don't have to think about it; as I said above the decoding is done 
automatically (all unknown headers are treated as unstructured and rfc2047 
decoding is done automatically).

----------
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29678>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to