Support » Plugin: WP Migrate DB » 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 5 months, 3 weeks ago by  user48958.
Viewing 1 replies (of 1 total)
  • 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)
  • You must be logged in to reply to this topic.