Chinese characters in list name shows question mark (?)
Hi list,
I set up a mailman3 server and built a few lists to test.
When I set the list name using Chinese characters, the web site shows correctly. However in the subscribing welcome mail the list name was shown in question marks. Screenshot is here:
https://nextcloud.slat.org/index.php/s/CxPjpYMbQzQ6444
The LANGUAGE_CODE settings.py (in Debian /etc/mailman3/mailman-web.py) is set to zh-tw , and USE_I18N and USE_L10N are all set to True.
Is there any other setting I should look at?
Thanks, Franklin
On 10/23/19 7:12 AM, Franklin Weng wrote:
Hi list,
I set up a mailman3 server and built a few lists to test.
When I set the list name using Chinese characters, the web site shows correctly. However in the subscribing welcome mail the list name was shown in question marks. Screenshot is here:
The name of the list from the screenshot seems to be zh-l10n@lists.linux.org.tw. The thing shown with ?s in the screenshot is the list's display_name (called Display name in Postorius).
The LANGUAGE_CODE settings.py (in Debian /etc/mailman3/mailman-web.py) is set to zh-tw , and USE_I18N and USE_L10N are all set to True.
These settings are all for Django and have nothing to do with how the list welcome message is sent.
Is there any other setting I should look at?
The list's preferred_language setting (Postorius -> Settings -> List Identity -> Preferred Language. The list welcome message is encoded in Mailman's character set for the list's preferred_language. If this is English (USA), the character set is us-ascii. If it is set to Chinese (Taiwan), the character set is utf-8, and it should work.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Hi Mark,
Thanks for your reply.
Mark Sapiro 於 2019/10/24 上午6:10 寫道:
Is there any other setting I should look at?
The list's preferred_language setting (Postorius -> Settings -> List Identity -> Preferred Language. The list welcome message is encoded in Mailman's character set for the list's preferred_language. If this is English (USA), the character set is us-ascii. If it is set to Chinese (Taiwan), the character set is utf-8, and it should work.
However in my settings -> List Identity page I didn't see Preferred Language option.
https://nextcloud.slat.org/index.php/s/45tGaE7ALgAFQFK
What may be possible wrong that I couldn't see Preferred Language settings in the web interface?
Thanks, Franklin
Franklin Weng 於 2019/10/24 上午8:05 寫道:
Hi Mark,
Thanks for your reply.
Mark Sapiro 於 2019/10/24 上午6:10 寫道:
Is there any other setting I should look at? The list's preferred_language setting (Postorius -> Settings -> List Identity -> Preferred Language. The list welcome message is encoded in Mailman's character set for the list's preferred_language. If this is English (USA), the character set is us-ascii. If it is set to Chinese (Taiwan), the character set is utf-8, and it should work. However in my settings -> List Identity page I didn't see Preferred Language option.
https://nextcloud.slat.org/index.php/s/45tGaE7ALgAFQFK
What may be possible wrong that I couldn't see Preferred Language settings in the web interface?
I got it. It is implemented in postorius 1.2.5 but my Debian buster contains 1.2.4-1 for now.
Franklin
On 10/23/19 5:22 PM, Franklin Weng wrote:
Franklin Weng 於 2019/10/24 上午8:05 寫道:
What may be possible wrong that I couldn't see Preferred Language settings in the web interface?
I got it. It is implemented in postorius 1.2.5 but my Debian buster contains 1.2.4-1 for now.
Actually, there is no 1.2.5. The next release after 1.2.4 is 1.3.0, but you can still set preferred_language for the list using the REST API or mailman shell.
For example in mailman shell
$ mailman shell -l zh-l10n.lists.linux.org.tw Welcome to the GNU Mailman shell The variable 'm' is the zh-l10n.lists.linux.org.tw mailing list
m.preferred_language <Language [en] English (USA)> m.preferred_language = 'zh_TW' m.preferred_language <Language [zh_TW] Chinese (Taiwan)> commit()
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Hi Mark,
Mark Sapiro <mark@msapiro.net> 於 2019年10月24日 週四 上午8:42寫道:
Actually, there is no 1.2.5. The next release after 1.2.4 is 1.3.0, but you can still set preferred_language for the list using the REST API or mailman shell.
For example in mailman shell
$ mailman shell -l zh-l10n.lists.linux.org.tw Welcome to the GNU Mailman shell The variable 'm' is the zh-l10n.lists.linux.org.tw mailing list
m.preferred_language <Language [en] English (USA)> m.preferred_language = 'zh_TW' m.preferred_language <Language [zh_TW] Chinese (Taiwan)> commit()
Thanks for your help. I did what you said above, but then I still got the same result even after restarting mailman3 services.
~# mailman shell -l zh-l10n.lists.linux.org.tw Welcome to the GNU Mailman shell The variable 'm' is the zh-l10n.lists.linux.org.tw mailing list
m.preferred_language <Language [zh_TW] Chinese (Taiwan)> quit()
I created a new list with Chinese display name, set the preferred_language and then subscribed to it. Also got question marks.
Is there anything else to try?
Thanks, Franklin
On 10/24/19 4:53 AM, Franklin Weng wrote:
Thanks for your help. I did what you said above, but then I still got the same result even after restarting mailman3 services.
~# mailman shell -l zh-l10n.lists.linux.org.tw Welcome to the GNU Mailman shell The variable 'm' is the zh-l10n.lists.linux.org.tw mailing list
m.preferred_language <Language [zh_TW] Chinese (Taiwan)> quit()
The issue is the list welcome message is sent in the character set of the new member's preferred language and if that is not set in the subscription request, and it's not possible to do that in Postorius, it defaults to the installation's preferred language.
It should probably default to the list's preferred language. See <https://gitlab.com/mailman/mailman/issues/608>
You have two choices:
You can set the installation's default language by putting
[mailman] default_language: zh_TW
in your mailman.cfg, or you can leave the default language English and set the character set for English to utf-8 by putting
[language.en] charset: utf-8
in your mailman.cfg.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Hi Mark,
Mark Sapiro 於 2019/10/26 上午2:08 寫道:
The issue is the list welcome message is sent in the character set of the new member's preferred language and if that is not set in the subscription request, and it's not possible to do that in Postorius, it defaults to the installation's preferred language.
It should probably default to the list's preferred language. See <https://gitlab.com/mailman/mailman/issues/608>
You have two choices:
You can set the installation's default language by putting
[mailman] default_language: zh_TW
in your mailman.cfg, or you can leave the default language English and set the character set for English to utf-8 by putting
[language.en] charset: utf-8
in your mailman.cfg.
Thanks for your help. After trying I found that it only worked when I set the [language.en] charset to utf-8. If I didn't set this but only set default_language in [mailman] section to zh_TW it still sent ? in the welcome messages.
I commented in the issue.
Thanks, Franklin
participants (2)
-
Franklin Weng
-
Mark Sapiro