django-mailbox
django-mailbox copied to clipboard
Fix default_charset and _process_message() to accept emojis in utf-8 encode
This fix works in python 2.7, django 1.11 and database with charset utf8 and collation ut8_general_ci. I can't changing charset and collation of production database for an emoji in email subject.
https://github.com/coddingtonbear/django-mailbox/pull/198
Is this issue going to be fixed soon? I am getting errors because of emoji's in email subject.
As far as i’m aware, this isn’t an issue for users using a properly configured database, @sanderroosendaal — you may want to look into that first.
Relatedly, the associated PR above isn’t one that is mergeable for a variety of reasons; so the answer is not likely to be one you want to hear.
@coddingtonbear Understood, but what is a proper database setting? djang-mailbox set my mysql database to utf8mb4_unicode_ci for the subject field. This generates an error on fetching the email.
It’s very difficult to say without having at least a traceback; do you happen to have one?
Just to be clear — this module is not involved in selecting your collation, so the proper fix is outside in your django/db settings. Without knowing more, I might suggest the following resources:
- http://blog.manbolo.com/2014/03/31/using-emojis-in-django-model-fields
- https://stackoverflow.com/questions/44496101/how-to-insert-emoji-into-mysql-5-5-and-higher-using-django-orm
thanks for replying. I do have a traceback but don't want to clutter your issues list. I will check the links you kindly provided.
The setting has ben fixed on main (but there is no release date yet)