Sage Pointer
New Pleskian
TITLE:
Plesk is losing unicode characters > FFFF in mysql dump
PRODUCT, VERSION, OPERATING SYSTEM, ARCHITECTURE:Plesk Onyx 17.8.11, Linux Ubuntu 16.04 x64, MySQL 5.7.25-0ubuntu0.16.04.2
PROBLEM DESCRIPTION:When exporting MySQL database with Export/Import function or Backup Manager, it is dumped in utf8 charset (not utf8mb4), and all symbols > FFFF (for example, emoji and some CJK symbols) are lost and replaced with ? in dump.
So, Plesk Backup feature is lossy and cannot be used in production environment, if any of your database uses text fields with emoji, for example.
STEPS TO REPRODUCE:So, Plesk Backup feature is lossy and cannot be used in production environment, if any of your database uses text fields with emoji, for example.
1. Create database in Plesk
2. Run a SQL query under this database:
CREATE TABLE emoji (data varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL);
INSERT INTO emoji (data) VALUES (UNHEX('f09f9880')), ('Test');
3. Export this database and import it back.
ACTUAL RESULT:2. Run a SQL query under this database:
CREATE TABLE emoji (data varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL);
INSERT INTO emoji (data) VALUES (UNHEX('f09f9880')), ('Test');
3. Export this database and import it back.
Instead of emoji symbol, it will be question mark inside a table. Latin text is preserved as is.
EXPECTED RESULT:Emoji symbol should be preserved and not replaced with question mark.
ANY ADDITIONAL INFORMATION:To solve this, you can for example run mysqldump with --default-character-set=utf8mb4 option.
YOUR EXPECTATIONS FROM PLESK SERVICE TEAM:Confirm bug