On 9/14/19 4:06 AM, Ugnius S wrote:
Yes, I have made several tests. I have set charset: iso-8859-13 and default_language: lt in mailman.cfg.
If you created the list before you set default_language: lt in mailman.cfg, the list's preferred_language is possibly 'en;' with character set us-ascii.
(Also I have set LANGUAGE_CODE = 'lt' in the settings_local.py, but I think it is not related to this case.)
Yes, LANGUAGE_CODE in settings_local.py is not relevant to this.
I have tried to set utf-8 as well in mailman.cfg as well. And I can confirm - in all tested cases text characters are correct (in footer as well) if sender sends text only.
OK
If sender sends message in HTML (mostly all users send) then no
matter what the encoding is set in my mailman's configuration or iso-8859-13, or utf-8 message body looks correct, but in footer all national characters are replaced with question marks " ? ".
The addition of the footer is done by mailman/handlers/decorate.py. In the plain text case the message body is converted to unicode, the unicode footer is appended to the body and the new body is encoded for transmission. The encoding is the first of the list's character set, the incoming message's character set or utf-8 which produces no error.
In the case where the incoming message is not a single plain text message part, the footer is added as a separate MIME part with the unicode footer encoded in the list's character set with errors='replace'. This is what produces the '?' characters. I suspect this happens because the list's preferred_language is 'en' with character set us-ascii.
try running Mailman's
bin/mailman shell -l your_list@domain
at the prompt enter
m.preferred_language
if the response is not
<Language [lt] Lithuanian>
do
m.preferred_language = 'lt'
and then control-D to exit.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan