Support » Fixing WordPress » previously OK Unicode text now scrambled

  • My blog was hacked some time ago. I’ve got everything clean again (I hope). But ever since the hack all Chinese characters and letters with diacritics have become scrambled (e.g., the site displays “周有光” instead of “周有光”, and “Zhōu YÇ’uguāng” instead of “Zhōu Yǒuguāng”).

    If I save the scrambled text in a text file and then force that file to reload as UTF-8 everything displays correctly. But the head of the HTML file is set for “charset=utf-8”, so I don’t understand what’s wrong.

    Example:
    http://pinyin.info/news/2012/zhou-youguang-writes-about-pinyin-info/

    This problem affect hundreds of posts and hundreds of comments, so I’m anxious to get them un-FUBARed as quickly and simply as possible.

    How can I fix this?

    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Check the database encoding in MySQL. Even though you have it specified in the header files, the database might be using different type of encoding. You can access your MySQL database from a phpmyadmin web interface.

    Many thanks. That seems to be it. Somehow the tables in that database (but not in all of my others, for some reason) are now marked as being “latin1_swedish_ci”.

    I looked around the phpmyadmin interface but didn’t see a way to change them over to utf-8. Any suggestions? I’m afraid I’m just a newbie when it comes to MYSQL.

    Hi Pinyin,

    You can change all the tables by:

    1. Logging in to phpmyadmin
    2. Select the database
    3. navigate to Operations tab
    4. From the Collation drop down menu you can select the encoding.

    Thanks, Johnb81.

    Unfortunately, that didn’t work. Perhaps that only affects any new tables in the database. At any rate, it didn’t change the pre-existing tables, which are still marked as being Swedish.

    In this case most probably you have to change the text directly from the MySQL database. Refer to the following:

    Search and Replace in WordPress MySQL Database

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘previously OK Unicode text now scrambled’ is closed to new replies.