I got the error below in django when saving a field with emoji character in the admin panel.
OperationalError at /admin/core/message/add/ (1366, "Incorrect string value: '\xF0\x9F\x98\x9E \xF0...' for column 'name' at row 1")
I'm sure the database is ready for utf8mb4
, because I can write/read these emoji character in phpmyadmin
.
More, the saved emoji character displayed correctly in phpmyadmin
but displays ???
in django output.
And in my another django project, the emoji plays well, till I just cannot find the difference between the two environment.
So what can be the problem when I save the same thing using python?
The problem is under django framework, so I want a solution that make django work.