Description
When using e-mail notifications and utf-8 charset, mail notifies received have broken body encoding for non-english content. It was tested using russan utf-8 encoded text.
Steps to reproduce
file /usr/lib/python2.4/site-packages/MoinMoin/config.py has {{{charset = 'utf-8' }}}
Example
In mails received all non-english body is shown like {{{- * =D0=9C=D0=B8=D1=82=D0=B5 =D0=91. =D0=94=D0=98=D0=94 + * =D0=9C=D0=B8=D1=82=D0=B5 =D0=91. =D0=94=D0=98=D0=94 [part] + = }}}
Details
MoinMoin Version |
1.5.4 |
OS and Version |
linux 2.6 |
Python Version |
2.4.2 |
Server Setup |
gentoo |
Server Details |
|
Language you are using the wiki in (set in the browser/UserPreferences) |
russian |
Workaround
The next patch helps to solve the problem
--- MoinMoin/util/mail.py 2006-05-11 19:24:00.000000000 +0300 +++ /usr/lib/python2.4/site-packages/MoinMoin/util/mail.py 2006-08-25 20:39:43.000000000 +0300 @@ -75,7 +75,7 @@ charset.header_encoding = QP charset.body_encoding = QP msg.set_charset(charset) - msg.set_payload(charset.body_encode(text)) + msg.set_payload(text) # Create message headers # Don't expose emails addreses of the other subscribers, instead we
after applying this patch to utils/mail.py mails received have body encoded using QP and are shown properly. Seems charset.body_encode(text) is excessive here.
Note: This fix makes it work, but is incorrect and will break again if you install a fixed python version.
Discussion
Plan
- Priority:
- Assigned to:
Status: Duplicate of MoinMoinBugs/ResetPasswordEmailImproperlyEncoded, was not a bug in MoinMoin but a broken Python. Moin works it around now.