[Zope3-checkins] Re: SVN: Zope3/trunk/src/zwiki/ WkikMailer now sends mail encoded in UTF-8

Dmitry Vasiliev lists at hlabs.spb.ru
Fri Nov 11 03:25:14 EST 2005


Philipp von Weitershausen wrote:
> Dmitry Vasiliev wrote:
> 
>>Log message for revision 40000:
>>  WkikMailer now sends mail encoded in UTF-8
>>  
>>
>>Changed:
>>  U   Zope3/trunk/src/zwiki/tests/test_wikimail.py
>>  U   Zope3/trunk/src/zwiki/wikipage.py
> 
> 
> [snip]
> 
> 
>>+    def _getMessage(self, subject, body):
>>+        message = MIMEText(body.encode("utf-8"), "plain", self.encoding)
>>+        message["Subject"] = Header(subject.encode("utf-8"), self.encoding)
> 
> 
> Is there a particular reason why you use the hard-wired 'utf-8' name in
> the encode() statement but later use self.encoding in the same lines?
> Shouldn't it read:
> 
>     def _getMessage(self, subject, body):
>         message = MIMEText(body.encode(self.encoding), "plain",
>                            self.encoding)
>         message["Subject"] = Header(subject.encode(self.encoding),
>                                     self.encoding)

Yes, you're right. It was my mistake. I've just fixed it.

-- 
Dmitry Vasiliev (dima at hlabs.spb.ru)
     http://hlabs.spb.ru


More information about the Zope3-Checkins mailing list