WP2.2 by default doesn't establish proper UTF-8 connection to the db (5 posts)

  1. Guntis
    Posted 9 years ago #

    Just upgraded to 2.2 and discovered that all my blog shows question marks instead of Latvian letters. It turns out wp-settings.php file is missing 2 lines of code. After the line 264
    these 2 lines should be inserted:
    mysql_query("SET CHARACTER SET utf8");
    mysql_query("SET NAMES utf8");

    Could you please insert them in the original setup package file? MySQL 5 needs this to show proper UTF-8 encoding.

  2. MichaelH
    Posted 9 years ago #

    Would putting the new DB_CHARSET and DB_COLLATE definitions in wp-config.php work?

    See Editing wp-config.php

  3. Guntis
    Posted 9 years ago #

    SORRY!!! It's not wp-config.php file! It's wp-settings.php file.
    For me these two lines do the trick and Latvian letters appear properly. Could you please include these 2 lines there?

  4. lelion
    Posted 9 years ago #


    Did you try wp-config.php?

    Before I needed to edit wp-db.php to add SET NAMES and COLLATION there (UTF-8). I needed that to display correctly both in the blog and in the MySQL database cyrillic characters. Now I can do it via the wp-config.php file, which is a major relief:)

    Worst case: You can edit manually the wp-settings.php file?...

    Hope this helps:)

  5. jamespoling
    Posted 9 years ago #

    I believe I have tried al of these steps. I'm still having the problem as related here.


Topic Closed

This topic has been closed to new replies.

About this Topic