KawaiKx KawaiKx - 8 months ago 41
MySQL Question

Emoji not visible when copied from one table to another in Mysql

I have text with emojis in a sql table. Collation is set to utf8mb4_bin. The mobile app reads the emoji from table and displays correctly. It inserts the emojis properly.

Using dashboard, sometimes I copy this text to another table with same column and collation. But emoji from this table is not visible in mobile app. I see only ????????

Why so?


I finally cracked it. It was an issue with database connection of the dashboard from where I was copying data from one table to another. the connection encoding was set to utf8. I changed it to utf8mb4.

This link was also helpful in figuring out things. https://mathiasbynens.be/notes/mysql-utf8mb4