go to bug id or search bugs for
I use a Chinese word as mail subject prefix, but mlmmj doesn't encode it.
*) in mlmmj, mail subject prefix is set to a Chinese word, e.g. '[中文]'.
*) Compose a message with subject: "Test"
*) Email sent out by mlmmj has this mail header:
Subject: <Chinese> Test
Another real-world example, compose email with subject "中文" (both mlmmj subject
prefix and original mail subject are same Chinese word):
Subject: [中文] =?UTF-8?Q?=E4=B8=AD=E6=96=87?=
Mlmmj should construct new mail subject with mlmmj subject prefix and original mail
subject first, then encode it.
Add a Patch
Found a solution: store encoded string in `control/prefix` works.
This must be mentioned in document: http://mlmmj.org/docs/tunables/
My solution with python code:
>>> from email.header import Header
>>> Header(u'中文', 'utf-8').encode()
Store '=?utf-8?b?5Lit5paH?=' (without quotes) in 'control/prefix'.
Storing encoded subject prefix text doesn't work well:
*) Webmail (Roundcube) correctly displays the mail subject:
<prefix> <original subject>
*) reply the email, received email subject becomes:
<prefix> Re: <prefix> <original subject>
And this goes on and on if you reply it:
<prefix> Re: <prefix> Re: <prefix> <original subject>
<prefix> Re: <prefix> Re: <prefix> Re: <prefix> <original subject>
Same issue if we store raw Chinese words in 'control/prefix', but no issue with English
It's more like a mlmmj bug while handling non-ascii subject prefix.
This is a duplicate of #16, or closely enough related that they should be solved together.
Yes this issue is duplicate of #16. (i didn't see it, sorry about this.)
IMO, mlmmj should:
1. decode original subject first
2. combine (raw) subject prefix and decoded subject
3. encode combined subject in UTF-8.