• Hello!

    I have two sites, one live and one staging site. I use a plugin that imports users. The strange thing is that the CSV import works fine on the staging site, but on the live site the Swedish letters looks strange and are not imported correct. Any ideas how to fix this?

    Big Thanks in advance!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Most probably, this is an encoding issue:
    Make sure that your site declares that it uses UTF-8.
    Make sure that all relevant tables in your database are encoded with UTF-8 (more specifically utf8mb4)
    Make sure that the CSV file is saved in UTF-8 format.

    Which plugin do you use for import?
    How did you create the CSV file?
    What do the Swedish letters look like after import? (This may give a hint on what side of the equation needs to be fixed.)

    Thread Starter topes

    (@topes)

    Please see below what the letters look like after import.
    ——-
    ? = ??
    ? = ??
    ——-

    The plugin is an add on for Learndash called Group registration (wisdm labs).

    The CSV file is created using Table tool for macbook saved as UTF-8. The format looks as the sample file when opened in a text editor.

    The database collation is utf8mb4_unicode_ci.

    wp-config defines charset utf8.

    The strange thing is that my staging site import looks ok.

    I also tried a fix that messed my site up, but made the imported users look ok. I comented out:

    define(‘DB_CHARSET’, ‘utf8’);
    define(‘DB_COLLATE’, ”);

    I needed to restore the site because it was a mess afterwords. It also made other swedish letters look strange, but as I said the imported ones looked ok.

    Any ideas what to check next?

    You need to check the database encoding for each table. The database encoding and collation are just default values that will be used whenever a new table gets created.
    In this case, you may want to check encoding and collation for wp_users and wp_usermeta.

    Thread Starter topes

    (@topes)

    I checked the collation on the tables and collumn and it seems ok. After clearing all bad looking users, deleting and installing the plugin again it seems to work. Thanks for all inputs!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘CSV import strange letters’ is closed to new replies.