[Email-SIG] set_payload() -- SF bug # 1409455 (original) (raw)
Mark Sapiro msapiro at value.net
Tue Feb 7 06:30:31 CET 2006
- Previous message: [Email-SIG] set_payload() -- SF bug # 1409455
- Next message: [Email-SIG] set_payload() -- SF bug # 1409455
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Barry Warsaw wrote:
On Feb 6, 2006, at 8:18 PM, Tokio Kikuchi wrote:
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?
I've tested my test cases with Tokio's patch and they (still) work. But, they worked without Tokio's addition so that doesn't say much. Looking at the code, I think a test case would need to have an initial character encoding of 'euc-jp' or 'shift_jis' to see the problem that Tokio is fixing.
If there are no objections, I'm going to apply these to 2.5.7 and 3.0.
I don't object.
-- Mark Sapiro <msapiro at value.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
- Previous message: [Email-SIG] set_payload() -- SF bug # 1409455
- Next message: [Email-SIG] set_payload() -- SF bug # 1409455
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]