[Email-SIG] set_payload() -- SF bug # 1409455 (original) (raw)

Barry Warsaw barry at python.org
Tue Feb 7 05:58:03 CET 2006


On Feb 6, 2006, at 8:18 PM, Tokio Kikuchi wrote:

Hi again Barry,

Tokio Kikuchi wrote: Barry Warsaw wrote:

Mark Sapiro submitted SF bug #1409455 against email 2.5.

https://sourceforge.net/tracker/index.php? func=detail&aid=1409455&groupid=5470&atid=105470 Hi, I am now testing the patch but it looks like it breaks some of japanese mail encoding rules, input/output charset conversion. I want to look at it closer but it may take some time because I'm busy this and next weeks on my students. :-( This patch (in addition to the SF uploaded one) should be OK. --- /home/mailman/src/sf/mailman-2.1/misc/email-2.5.6/email/ Message.py Tue Feb 7 10:12:53 2006 +++ Message.py Tue Feb 7 09:55:55 2006 @@ -272,6 +272,8 @@ charset=charset.getoutputcharset()) else: self.setparam('charset', charset.getoutputcharset()) + if str(charset) <> charset.getoutputcharset(): + self.payload = charset.bodyencode(self.payload) if not self.haskey('Content-Transfer-Encoding'): cte = charset.getbodyencoding() if callable(cte):

Hi Tokio,

Thanks! Do you have a test case for this patch?

If there are no objections, I'm going to apply these to 2.5.7 and 3.0.

-Barry



More information about the Email-SIG mailing list