• i am migrating a wordpress blog, and i moved the DB from 4.1 -> 4.1 mysql, with collated character set latin1_swedish_ci. i moved the db with the export function in phpmyadmin, and loaded it using the mysql prompt. i also tried exporting in MYSQL40 compatability.

    the new site is showing some wierd characters. the code, headers, etc are all the same as the original site (UTF-8)

    but the original site displays the characters perfectly.

    any ideas?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Did you move the site to another server as well. If so, and you’re on apache, the ‘AddDefaultCharset’ httpd.conf directive may be set to something which is causing problems for you. For instance, I had to change ‘AddDefaultCharset UTF-8’ to ‘AddDefaultCharset ISO-8859-1’ on my site, because it was causing problems displaying certain characters properly.

    It didn’t matter that I had <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> in my webpages, the apache directive was overriding it.

    If this is the case, edit your httpd.conf file. If you don’t have access to edit it, then you can override it using .htaccess…
    AddDefaultCharset ISO-8859-1
    …or…
    AddDefaultCharset Off

    If you use the latter, you can supply the charset info within your webpage meta tag.

    Thread Starter coverlim

    (@coverlim)

    thanks for the advice. i checked and it is not setting the Default Char set in the conf file. I also tried specifying it with .htaccess to no avail.

    in phmyadmin on both sites, i see the characters im trying to get rid of.

    for latin1_swedish_ci what charset should be specified in the header?

    Thread Starter coverlim

    (@coverlim)

    the database is in latin1_swedish_ci, which means it should be in ISO-8859-1. but the page and the WP install is UTF-8. if i switch all this to ISO-8859-1 it looks even worse. even teh DB settings seem strange… see below.

    mysql> SHOW VARIABLES LIKE ‘character\_set\_%’;
    +————————–+——–+
    | Variable_name | Value |
    +————————–+——–+
    | character_set_client | latin1 |
    | character_set_connection | latin1 |
    | character_set_database | latin1 |
    | character_set_results | latin1 |
    | character_set_server | latin1 |
    | character_set_system | utf8 |
    +————————–+——–+
    6 rows in set (0.00 sec)

    Did you make the change here as well:
    Options > Reading > Encoding for pages and feeds

    Thread Starter coverlim

    (@coverlim)

    yes i have … there it is utf-8, but if i switch to iso-8859-1 the caracters look even stranger.

    Thread Starter coverlim

    (@coverlim)

    i also tried exporting the DB for 3.23 support, to remove all teh character set references from teh DB. is exactly the same.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘character set problems’ is closed to new replies.