My database, tables, fields all are using utf8mb4. I can store well emoji symbols into some fields. Now I try to query such as:
SELECT * FROM user
WHERE name='😀😇😈😉'
Amazing, the result are records with field names different such as '😀😃😇😉'
Looks like mysql matches emoji strings by their lengths but not contents.
Any idea to fix that problem? Many thanks.
Just did this command to my table:
ALTER TABLE tablename CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
that's all. the result is correct then.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With