Vel
Vel

Reputation: 9331

Emoji icon not insert in mysql?

Im trying to insert emoji icon to my mqsql. but it insert like í ½í¸.

I changed my Database CHARACTER SET utf8mb4 and I changed my table CHARACTER SET utf8mb4 and collate to utf8mb4_general_ci or utf8mb4_bin.

but still not stored emoji icon. im using mysql query browser.

Im getting emoji icon from here

https://emojipedia.org/smiling-face-with-open-mouth-and-smiling-eyes/

how to fix this issue?

Upvotes: 0

Views: 2139

Answers (1)

Arun pandian M
Arun pandian M

Reputation: 882

  • change database default collation to utf8mb4
  • change table collation as CHARACTER SET utf8mb4 COLLATE utf8mb4_bin
  • change the emoji column collation to utf8mb4_bin

if possible set characterset in dbconnection to utf8mb4 $database_connection->set_charset("utf8mb4");

refer : How to store Emoji Character in My SQL Database

Upvotes: 1

Related Questions