Hi, it is python 3.10. Problem is... some mailing lists were created long ago, with python2 something. Most probably 2.5. And the tables on mysql were set to latin1.
That I know. Question now is how to fix this. Any suggestion? What is the table? I probably can run some script for these specific lists that have the failure, import data as latim-1, and update back to the table as utf-8.
Best Regards, Helio Loureiro https://helio.loureiro.eng.br https://github.com/helioloureiro https://mastodon.social/@helioloureiro
On Fri, 22 Mar 2024 at 20:53, Mark Sapiro <mark@msapiro.net> wrote:
On 3/22/24 05:37, Helio Loureiro wrote:
Hi,
I just found several lists have the issue like this regarding charset:
(venv) mailman@new-mailman3 ~ (v3.1.1)> mailman members ... Traceback (most recent call last): ... line 109, in display_members print(f'{address.display_name} <{address.original_email}>', UnicodeEncodeError: 'latin-1' codec can't encode character '\u0142' in position 9: ordinal not in range(256)
There is something in your python that has set the encoding for stdout to latin1 instead of the default utf-8. E.g.
$ python3.10 Python 3.10.9 (main, Dec 11 2022, 12:59:24) [GCC 9.4.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> name = 'abc\u0142def' >>> print (f'{name}') abcłdef >>> import sys >>> sys.stdout.reconfigure(encoding='latin1') >>> print (f'{name}') Traceback (most recent call last): File "<stdin>", line 1, in <module> UnicodeEncodeError: 'latin-1' codec can't encode character '\u0142' in position 3: ordinal not in range(256) >>>
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Mailman-users mailing list -- mailman-users@mailman3.org To unsubscribe send an email to mailman-users-leave@mailman3.org https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/ Archived at: https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/message/...
This message sent to helio@loureiro.eng.br