On 6/27/25 06:09, Gabriele Carioli via Mailman-Users wrote:
I've recently upgraded an ancient 2.1.12 mailman installation to 2.1.39 and 
noticed an encoding issue, when adding users via add_members.

Steps to reproduce and fix the issue:

1. Put these accented user names in an utf-8 file (users-utf-8.txt):
Těst Accénti <t...@dominio.it>
Mariò Rosśi <mario.ro...@dominio.it>

2. Set un a dummy list "dummylist" with it(alian) and en(glish) as languages

3. Set italian as main language

4. remove_members --all -n -N dummylist

5. add_members -a n -w n -r users-utf-8.txt  dummylist
You will see garbage and encoding problems in the output, which you will see 
also on the web interface.

The Default charset for Italian in Mailman 2.1 is iso-8859-1, not utf-8. The issue is your utf-8 encoded accented letters are being interpreted as iso-8859-1. Thus when the utf-8 encoded

Těst Accénti <t...@dominio.it>
Mariò Rosśi <mario.ro...@dominio.it>

is decoded as iso-8859-1, it looks something like

TÄ<9b>st Accénti <t...@dominio.it>
Mariò RosÅ<9b>i <mario.ro...@dominio.it>

You can change the encoding for Italian from iso-8859-1 to utf-8, but in addition to recoding the message catalog as you have done, you also have to add

add_language('it', _('Italian'), 'utf-8', 'ltr')

to mm_cfg.py. Also, if you have any iso-8859-1 strings in the list's configuration, you have to recode those. There is a script at https://www.msapiro.net/scripts/recode_list that can do that.

Possibly you had already done some or all of this in your 2.1.12 installation before upgrading.

--
Mark Sapiro <m...@msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan

------------------------------------------------------
Mailman-Users mailing list -- mailman-users@python.org
To unsubscribe send an email to mailman-users-le...@python.org
https://mail.python.org/mailman3/lists/mailman-users.python.org/
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: https://www.mail-archive.com/mailman-users@python.org/
   https://mail.python.org/archives/list/mailman-users@python.org/
Member address: arch...@jab.org

Reply via email to