hi Mark,
thank you for your answer.
On 5/27/20 8:30 PM, Mark Sapiro wrote:
[…]
(1366, "Incorrect string value: '\\xF0\\x9F\\x99\\x82\\x0AA...' […] Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable […] kann halt NIE am mittwoch. viel spass =F0=9F=99=82 […] Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable […] <div dir=3D=22auto=22>kann halt NIE am mittwoch. viel spass =F0=9F=99=82<=
When HyperKitty gets an exception like this in archiving a message, it queues it in /var/lib/mailman3/archives/hyperkitty/spool and on every new post, retries the queued messages. This message fails again on retry and is requeued.
How would you suggest this be handled more gracefully?
the way mailman3 is handling exceptions is totally fine and couldn't possibly be more graceful - i was referring to the error itself:
The underlying issue has been seen before. The basic problem is in MySQL and MariaDB the encoding is utf8 which only accepts utf8 encodings up to 3 bytes. It needs to be utf8mb4 to accept characters outside the base plane.
okay, i thought that the html part in the offending mail should've been 🙂 and that this was the culprit - thanks for clarifying this.
I've checked - database, table and columns were utf8mb4 already, whereas the connection to the db apparently not. Adding 'charset': 'utf8mb4' to the options-dict in the databases-variable in /etc/mailman3/mailman-web.py fixed the issue - django passes this on to mysqlclient. case closed :)
thank you very much & with kind regards, thoralf.