Forums

[resolved] Cyrillic text turns into ??? in blog posts and comments (4 posts)

  1. andreyco
    Member
    Posted 1 month ago #

    I'm having a lot of trouble getting WordPress to play nice when using cyrillic letters - in my case I have comments that are being left in Russian, as well as a few writers who will more than likely want to be able to post their entries in russian. Any time Russian text is introduced into the system, it is converted into question marks. I recently a received a comment that said "????, ???? ???????? ????"

    I have played around with the encoding in the settings tab of the admin page. The default is set to UTF-8 which is unicode and should theoretically support cyrillic text. I changed the encoding there to windows-1251. Unfortunately that made no difference. I have also tried using a few different themes, including the default WP theme, no success.

    I dug even further into the database, and the collation settings there are not using UTF-8 or windows-1251. I tried changing some of the encoding settings there, but was very hesitant...don't want to mess it up when I'm not sure what the results will be. Anyone will any insight, please reply and help me figure this out.

    The site in question is http://blog.calinchrist.com

  2. andreyco
    Member
    Posted 1 month ago #

    I just found the answer to my own question (after 3 days of searching forums all over the place).

    The answer came from http://blog.darrellnece.com/archives/185 and is quite simple:

    Are you getting ???? errors instead of Cyrillic when typing Russian? This can be quite frustrating, but not too hard once you know the code to fix. Took me about half a day to figure out, so hopefully, this will save someone a lot of time. Make sure to save your original wp-config.php files in case the need arises to re-install it.
    If you are on a windows server you will need to change your wp-config.php file as follows.
    define(’DB_CHARSET’, ‘utf8′);
    to
    define(’DB_CHARSET’, ‘windows-1251′);
    or
    define(’DB_CHARSET’, ‘windows1251′);
    If you are on a linux server, such as I, you will need to change your wp-config.php file as follows.
    define(’DB_CHARSET’, ‘utf8′);
    define(’DB_COLLATE’, ”);
    to
    //define(’DB_CHARSET’, ‘utf8′);
    //define(’DB_COLLATE’, ”);

  3. jonimueller
    Member
    Posted 1 month ago #

    I was just going to suggest commenting that out. We have developed a few sites in Serbian (Cyrillic rather than Latin Serbian) and I had a devil of a time until I figured that out also. I wonder if the devs shouldn't think about putting a comment in the code to that effect.

  4. jonimueller
    Member
    Posted 1 month ago #

    [Edited by jonimueller to remove duplicate post.]

Reply

You must log in to post.

About this Topic