• Resolved mixali

    (@mixali)


    Dear UpdraftPlus Team,

    When performing a migration using the restore backup function, the charset result importing the database into the new host that also is UTF-8 does not mach, and many characters will be wrong. As an example “Über mich” will was imported as “Über mich”. I did not get any related warning or such.

    I checked the created DB SQL export file by UpdraftPlus (from wp.com), where “Über mich” looks normal, and it includes:
    CHARSET=latin1 COLLATE=latin1_swedish_ci
    (…)
    'blog_charset', 'UTF-8', 'yes'

    What can I do to import this database correctly with UpdraftPlus?
    I also tried importing it manually into phpMyAdmin, selecting “utf-8” charset but I get the same result.

    Thanks in advance!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support vupdraft

    (@vupdraft)

    You can try changing the charset in phpMyAdmin before you do the restore by doing the following:

    1. Click the database name in the left pane.
    2. Click Operations in the top menu.
    3. Choose your desired collation from the dropdown menu.
    4. 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

    Plugin Support vupdraft

    (@vupdraft)

    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 */;

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

The topic ‘Wrong German Database charset when restoring’ is closed to new replies.