This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author r.david.murray
Recipients barry, dorosch, hwgdb Smith, r.david.murray
Date 2020-02-27.14:48:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1582814922.78.0.473305646032.issue39771@roundup.psfhosted.org>
In-reply-to
Content
I think you are saying that you want the charset in the encoded filename to be GBK rather than utf-8?  utf-8 should certainly display correctly in your email client, though, so if it is not there is something else going wrong.  

As far as the 3 tuple not working to set the charset...I believe what is happening there is that a header created by the application gets "refolded" on serialization, and refolding doesn't keep the existing charset, it converts everything to utf-8.  This is an intentional part of the design: the library handles the gory details of MIME and uses utf-8 as the charset for application created content.  It is actually an accident of the implementation that the tuple form of the filename is even accepted; you will note that it is *not* documented in the contentmanager docs.

It wouldn't be crazy to ask for this as a feature, and it could even be treated as a bug that it doesn't work if we want to, but it may not be easy to "fix", because it goes against the design philosophy of the new API.
History
Date User Action Args
2020-02-27 14:48:42r.david.murraysetrecipients: + r.david.murray, barry, dorosch, hwgdb Smith
2020-02-27 14:48:42r.david.murraysetmessageid: <1582814922.78.0.473305646032.issue39771@roundup.psfhosted.org>
2020-02-27 14:48:42r.david.murraylinkissue39771 messages
2020-02-27 14:48:42r.david.murraycreate