On 12/8/22 07:23, Odhiambo Washington wrote:
MM3-3.3.7, Hyperkitty-1.3.6
While importing, I encountered several of this error:
<CUT> MySQLdb.OperationalError: (1366, "Incorrect string value: '\\xF0\\x9F\\x98\\x8A, ...' for column 'content' at row 1") The above exception was the direct cause of the following exception: ... File "/opt/mailman/mm/venv/lib/python3.9/site-packages/django/db/backends/mysql/base.py",
That's a 4-byte utf-8 encoding for an emoji. MySQL and MariaDB have to be told to accept 4-byte encodings.
In the DATABASES['default'] definition, you need to set 'OPTIONS': {'charset': 'utf8mb4'}
Also, although it doesn't affect this, see https://docs.mailman3.org/projects/mailman/en/latest/src/mailman/docs/databa...
You might also need to modify the tables, particularly hyperkitty_email with something like
ALTER TABLE hyperkitty_email
DEFAULT CHARACTER SET utf8mb4,
MODIFY subject varchar(512)
CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
MODIFY content
CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan