Japanese characters lost in backup

Jorgo

Registered
Jun 17, 2005
2
0
151
Hello,
my hoster uses
PHP version 4.3.11
MySQL version 4.1.11-standard
cPanel Build 10.2.0-CURRENT 131

Today they had to restore a MySQL database with the inbuilt Restore Feature due to a MySQL server failure and the restored database, which contained western and asian characters, was partly corrupted.
It turns out that many, but not all, Japanese double-byte characters were lost and converted to invalid entities.

Do you have any advice for me how to proceed from here and what would be my best option to restore the backup correctly? Please ask me if you need more info.

Thanks in advance!
 

Jorgo

Registered
Jun 17, 2005
2
0
151
Sorry, I already found the answer :p

It's a problem of migrating from MySQL 4.0.x to 4.1.x
The characters are all stored in UTF-8, but as a consequence of migrating from MySQL 4.0.x the tables are marked as latin1, which leads to a false interpretation of the codepage. The solution is to open the sql dump with a utf-8 capable editor and replace all occurrences of "latin1" with "utf-8".