0

I'm working on a project with PHP/MYSQL. How do i store emojis in my database and read without alteration from PHP ?

My tables character set and collate are

CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci.

Cœur
  • 37,241
  • 25
  • 195
  • 267
lcshobin
  • 125
  • 1
  • 16
  • 1
    Make sure you are [UTF-8 *all* the way through](https://stackoverflow.com/questions/279170/utf-8-all-the-way-through) - particularly in your output. – Alex K. Nov 17 '17 at 11:27
  • If the DB has the correct value the storage is unrelated. How are you doing the select, is the encoding set on the connection there? – chris85 Nov 17 '17 at 11:28
  • Thank you man setting character set in connection worked – lcshobin Nov 17 '17 at 11:49

1 Answers1

1

Actually I found the solution. Character set should be defined in database connection too.

lcshobin
  • 125
  • 1
  • 16