Title: database dump encoding
Last modified: April 21, 2020

---

# database dump encoding

 *  Resolved [Vyacheslav](https://wordpress.org/support/users/badarmor/)
 * (@badarmor)
 * [6 years ago](https://wordpress.org/support/topic/database-dump-encoding/)
 * When I make backup of database whether by this plugin or by another backup plugin
   I get the sql file with rigidly set UTF8 encoding, as I understand. So for example
   unicode symbols like emoji get lost. They all get transformed to ? sign.
    As 
   I understand encoding should be utf8mb4. So I checked that in wp-config.php I
   have utf8mb4 is set. And on the server side in the mysql config file I have
 * [mysqld]
    init_connect = ‘SET collation_connection = utf8mb4_general_ci’ character-
   set-server = utf8mb4 collation-server = utf8mb4_general_ci [client] default_character_set
   = utf8mb4
 * Furthermore if I make dump in the server console like so
 * mysqldump -u username -p -dbname > file.sql
 * I get target encoding utf8mb4 and then by upload this sql file to test server
   emoji symbols don’t get lost.
 * So I found on github mysqldump php library here [https://github.com/ifsnop/mysqldump-php](https://github.com/ifsnop/mysqldump-php)
   
   I’m not so experienced in php development but I didn’t found the way to change
   encoding by class constructor. Of course I doubt that exactly this library is
   used php installed in the server. May by you use your own library.
 * So may be it worth to considerate include this option to change encoding. In 
   premium version of the plugin 😉 It will be a feature which other plugins don’t
   have.
 * I hope what i wrote isn’t total nonsense. May be I’ve done something wrong.
    
   Just really want to get things right for me and understand how it works. Thank
   you in advance.

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Author [Brad Markle](https://wordpress.org/support/users/bwmarkle/)
 * (@bwmarkle)
 * [6 years ago](https://wordpress.org/support/topic/database-dump-encoding/#post-12707252)
 * Hi [@badarmor](https://wordpress.org/support/users/badarmor/) thanks for the 
   ticket! I did some testing and I was able to replicate the issue. We’ll look 
   into this one and get back to you soon. If you have a moment to watch, I created
   a video to say thanks and to talk about the issue more – [https://youtu.be/cWfy1mAWlzw](https://youtu.be/cWfy1mAWlzw)
 *  Thread Starter [Vyacheslav](https://wordpress.org/support/users/badarmor/)
 * (@badarmor)
 * [6 years ago](https://wordpress.org/support/topic/database-dump-encoding/#post-12707347)
 * Thank you Brad for prompt reply. I was close to find the solution. Missed default-
   character-set const. And you get exactly what I need. Hope it will be in plugin
   functionality soon.
 *  Thread Starter [Vyacheslav](https://wordpress.org/support/users/badarmor/)
 * (@badarmor)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/database-dump-encoding/#post-12916922)
 * Hi Brad. Are you going to add this functionality or not? It’s really important
   to me. Thanks.
 *  Plugin Author [Brad Markle](https://wordpress.org/support/users/bwmarkle/)
 * (@bwmarkle)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/database-dump-encoding/#post-12921291)
 * Hi [@badarmor](https://wordpress.org/support/users/badarmor/),
 * I put in a pull request 4 days ago actually to resolve this issue – [https://github.com/BoldGrid/boldgrid-backup/pull/287](https://github.com/BoldGrid/boldgrid-backup/pull/287)
 * I got some constructive feedback from one of our developers though, so I’ll need
   to do some rework, but I am planning to get a fix out soon – should be in a few
   days.
 * Thanks!
    – Brad
 *  Plugin Author [Brad Markle](https://wordpress.org/support/users/bwmarkle/)
 * (@bwmarkle)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/database-dump-encoding/#post-12923080)
 * Hi [@badarmor](https://wordpress.org/support/users/badarmor/) We just released
   Total Upkeep 1.13.6 – which should fix the database charset issue. Can you upgrade
   and try again?
 * This one was actually a fun bug ticket to work on. Even if you have utf8 in your
   wp-config, WordPress still will default to utf8mb4 if it’s available, that took
   a bit to track down. Out of the box now, utf8mb4 will be used and this should
   resolve emoji issues.
 * Thanks!
    – Brad
 *  Thread Starter [Vyacheslav](https://wordpress.org/support/users/badarmor/)
 * (@badarmor)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/database-dump-encoding/#post-12929012)
 * Hi Brad.
    I’m glad you did it. Thanks for update. Now plugin does exactly what
   I need.
 * Many thanks to you!

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘database dump encoding’ is closed to new replies.

 * ![](https://ps.w.org/boldgrid-backup/assets/icon-256x256.png?rev=1880952)
 * [Total Upkeep – WordPress Backup Plugin plus Restore & Migrate by BoldGrid](https://wordpress.org/plugins/boldgrid-backup/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/boldgrid-backup/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/boldgrid-backup/)
 * [Active Topics](https://wordpress.org/support/plugin/boldgrid-backup/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/boldgrid-backup/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/boldgrid-backup/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [Vyacheslav](https://wordpress.org/support/users/badarmor/)
 * Last activity: [5 years, 11 months ago](https://wordpress.org/support/topic/database-dump-encoding/#post-12929012)
 * Status: resolved