Submit a content containing UTF-8 characters

So you’re inserting the data through phpMyAdmin. Are you viewing the data with phpMyAdmin as well? Or are you querying it through your website?

Note that phpMyAdmin uses the utf8 charset for the connection (or utf8mb4, not sure), but our PHP stack is configured to use latin1 by default. You can set the charset to use through your PHP connection code. Most frameworks and CMS should do this by default. It’s strongly recommended you set this to utf8 or utf8mb4 instead.

And if you’re wondering what utf8mb4 is, then know that utf8 in MySQL isn’t real UTF-8, but a shortcut from the MySQL developers, whereas utf8mb4 is the “real” UTF-8. MySQL utf8 and utf8mb4 store special characters in the same way, but emoji don’t aren’t supported correctly by utf8, you need utf8mb4 for that.

3 Likes