On 1/11/22 7:08 AM, Michal Soltys wrote:
Hi,
I have noticed that any mail send with text/html, e.g. with following headers:
Content-Language: en-US-large Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit
is slightly transformed by mailman3 - the body is put into its own part, but all the international letters are replaced by question marks.
The body being put in its own part is because of message decoration. In order to add the list's message header and/or footer the message is recast as multipart/mixed and the header and/or footer are added as separate MIME parts. See https://wiki.list.org/x/4030707 for an explanation of why this is done for non-plain text messages.
Having searched the list I tried:
- adding following to mailman.cfg:
[language.master] description: English (USA) charset: utf-8 enabled: yes
[language.en] description: English (USA) utf8 charset: utf-8 enabled: yes
I would have expected that to work.
- changing preferred language of a mailing list to something else via shell, e.g.:
m.preferred_language = 'pl'
That should be m.preferred_language = getUtility(ILanguageManager).get('pl')
- changed default_language to 'pl' in mailman.cfg
I would have expected any of those things to work, but I can see that they don't.
I'm looking into why.
- Ensured all relevant glibc locales are generated (not sure if that matters though in this case)
None of this seems to have any positive result - all mails, whether under 'pl' or 'en' setting still get all non-ascii chars replaced with question marks (in html case, probably(?) in any case where it becomes multipart).
Any ideas what to do so html mails are passed without filtering out their characters ? Do I have to recreate all mailing lists under new [language.en/master] settings ?
No, this is a bug. It has to do with message decoration (adding of headers and footers). You can probably avoid this issue by setting the list's filter_content and convert_html_to_plaintext to True. I am looking at why this occurs and fixing it.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan