You can try changing the charset in phpMyAdmin before you do the restore by doing the following:
- Click the database name in the left pane.
- Click Operations in the top menu.
- Choose your desired collation from the dropdown menu.
- Click the Go button to save.
Thread Starter
mixali
(@mixali)
Thank you @vupdraft
I tried it, but I get the same result… :/
It does not matter what collation I choose for the operations before restoring / or manually importing the database. The imported tables get always the same collation:
ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
But the characters get replaced for wrong ones, like in this table:
https://www.utf8-zeichentabelle.de/unicode-utf8-table.pl?start=128&number=128&names=-&utf8=char
For the destination site, try setting the collation to;
utf8_swedish_ci
Thread Starter
mixali
(@mixali)
Hi there,
I found that when the SQL GZ file of the Database in wordpress.com is generated by Updraftplus, it will contain the following version-specific comments at the begin of the SQL file:
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE=’NO_AUTO_VALUE_ON_ZERO’ */;
/*!40101 SET NAMES latin1 */;
/*!40101 SET foreign_key_checks = 0 */;
I overview them because I though they were just comments, but removing this comments allowed me to import the database correctly, and all characters display correctly.
In case it helps: as far I tested, the first 3 seem to be generated because of the Database setup in wordpress.com, with other plugins I didn’t got any @OLD_SQL_MODE or foreign_key_checks comments but SET NAMES utf8 */;