php - Allow MySQL to store emojis in utf8mb4 encoding? -


i want store emojis (android or iphone) in mysql database, tried many tutorials , posts, on internet :

how insert utf-8 mb4 character(emoji in ios5) in mysql?

http://andy-carter.com/blog/saving-emoticons-unicode-from-twitter-to-a-mysql-database

mysql utf8mb4, errors when saving emojis

i changed things tuts require. have following mysql configuration :

character_set_client : utf8mb4

character_set_connection : utf8mb4

character_set_database : utf8mb4

character_set_filesystem : binary

character_set_results : utf8mb4

character_set_server : latin1

character_set_system :utf8

collation_connection : utf8mb4_unicode_ci

collation_database : utf8mb4_unicode_ci

collation_server : latin1_swedish_ci

but can't still store 4 bits emojis on mysql database, have "????", pretty annoying.

please help.

"4 bytes", not "4 bits".

the column/table needs character set utf8mb4.

<meta charset="utf8">, not utf8mb4 -- talking html, not mysql. outside of mysql, proper name "utf-8" or "utf8"; utf8mb4 mysql kludge.

see "question marks" in https://stackoverflow.com/a/38363567/1766831

exactly 4 question marks implies column not changed. use alter table ... convert ...;


Comments