Reputation: 3592
I have migrated my db and some emojis are now missing:
https://i.sstatic.net/TDQnQ.png
on the dump .sql file I can see the emoji, but during the import process something is destroying some of the emojis, i've used this script to import:
Any ideas?
Upvotes: 2
Views: 1788
Reputation: 13722
This is an older question but answering for future readers. UTF8 is simple and universal on other platforms but MySQL has half-baked support for utf8 making it unnecessarily complex. In MySQL, utf8 is actually utf8mb4
and not utf8
(!!). Between that weirdness and WordPress's own utf8 vs utf8mb4 support, there are several things to look into.
Check your wp-config.php
if itβs got define('DB_CHARSET', 'utf8mb4');
Several backup scripts use this when deciding what character set to import to post-export.
Do a text search in your migration/backup SQL script for SET NAMES utf8
. It would be as an executable comment like /*!40101 SET NAMES utf8 */;
. Either ways, change utf8
there to utf8mb4
and retry the migration
Open your backup/migration SQL script and check the the CREATE TABLE
s have the correct CHARSET=utf8mb4
in them.
Beyond that, it's time to look into your MySQL setup, see this question/answer
Upvotes: 3