Emojis turn into question mark – same charset and collation
-
Hey there,
Migration Guru is the one tool that works pretty much all the time. Now I came across an issue, someone else was looking already for a solution in the past https://wordpress.org/support/topic/emoji-turned-into-question-mark-character/ – this person turned to another solution in the end.
After the migration of a website from server A to server B, suddenly emojis become question marks in
post_content
I checked, and while it’s true that the DB charset is differently on the old and the new server, the
wp_post
table andpost_content
have identical settings and that’s where the data is stored.Both wp_posts tables and both post_content on the old and new server show
utf8mb4_unicode_520_ci
🇨🇺 That’s one example of an emoji that got replaced → 🇨🇺
The new server runs on cPanel, and I think in cPanel it’s quite common to use
latin1_swedish_ci
for the database as default for best compatibility (not 100% sure about this information)The old server comes with a database default collation of
utf8mb3_general_ci
. While those are different, I don’t think it matters, because what matters is wp_posts and post_content, I think.In wp-config it shows on the old site (old server) and also on the new site (new cPanel server)
/** Database Charset to use in creating database tables. */
define('DB_CHARSET', 'utf8');
/** The Database Collate type. Don't change this if in doubt. */
define('DB_COLLATE', '');It seems like that problem comes from the migration process itself. This is not the first time I am seeing this, so I try it once and for all to solve it to avoid those many hours of troubleshooting in the future.
I am also trying alternative tools, but wonder how to deal with it with Migration Guru?
Thanks for your help, perhaps it can be solved once and for all
- The topic ‘Emojis turn into question mark – same charset and collation’ is closed to new replies.