Title: bug: backup script kills emojis
Last modified: October 25, 2018

---

# bug: backup script kills emojis

 *  [user48958](https://wordpress.org/support/users/user48958/)
 * (@user48958)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/bug-backup-script-kills-emojis/)
 * Backups created by this plugin have this at the top of the .sql file
 * `/*!40101 SET NAMES utf8 */;`
 * That kills all emojis during imports (e.g. `source <backup.sql>;`). Note that
   the generated backup SQL file **has** emojis and even tables within are fine (
   they are `CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci`). It’s just that that offending
   line clobbers emojis during the INSERT operation inside the backup script.
 * Replacing the offending line with
 * `/*!40101 SET NAMES utf8mb4 */;`
 * fixes the problem. I do want to add that emoji’s are getting more prevalent –
   even in business copy. So this was an issue for us till we dug deeper.
    -  This topic was modified 7 years, 11 months ago by [user48958](https://wordpress.org/support/users/user48958/).

Viewing 1 replies (of 1 total)

 *  Thread Starter [user48958](https://wordpress.org/support/users/user48958/)
 * (@user48958)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/bug-backup-script-kills-emojis/#post-10816846)
 * Also, it’s evident that this comes from `define('DB_CHARSET', 'utf8');` in `wp-
   config.php`. Not a fan of how mysql handles UTF8 in a brittle manner but since
   even the latest WP install uses utf8 in the default `wp-config.php` perhaps there
   is a better utf8 vs utf8mb4 detection for your script?

Viewing 1 replies (of 1 total)

 The topic ‘bug: backup script kills emojis’ is closed to new replies.

 * ![](https://ps.w.org/wp-migrate-db/assets/icon.svg?rev=2851356)
 * [WP Migrate Lite - Migration Made Easy](https://wordpress.org/plugins/wp-migrate-db/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-migrate-db/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-migrate-db/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-migrate-db/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-migrate-db/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-migrate-db/reviews/)

## Tags

 * [emoji](https://wordpress.org/support/topic-tag/emoji/)

 * 1 reply
 * 1 participant
 * Last reply from: [user48958](https://wordpress.org/support/users/user48958/)
 * Last activity: [7 years, 11 months ago](https://wordpress.org/support/topic/bug-backup-script-kills-emojis/#post-10816846)
 * Status: not resolved