Input and Save Chinese in WordPress

Ever since I started this blog I have been wanting the ability to write in Chinese. Every time I did WordPress would dutifully save the content but would then replace my characters with rectangles. Well, now I think I solved the problem: UTF8 encoding. As roundabout as life is, I solved my Chinese input problem while trying to track down the remnants of the Pharma Hack injection.

那么难, 想不起来问题. 今天结束了.

The issue was the lack of UTF8 but I did not know where to change my SQL database to save in UTL8. Recently I was struck down by the Pharma Hack and as best as I know have stopped it, but am still hunting for it. For the last long time I have been getting WordPress error log entries that looked like this:

WordPress database error Illegal mix of collations latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '=' for query SELECT id FROM wp_ss_search WHERE searchterms = 'фото singer stitch length model 237' LIMIT 1 made by shutdown_action_hook, do_action('shutdown'), call_user_func_array, wp_shortstat->track, wp_shortstat->sniffKeywords

Googling “WordPress database error Illegal mix of collations” yielded instructions about the error message and how to solve it. I went to my ISP and started up PHPMyAdmin, and there it was, most of my database was collating in Latin1-Swedish_ci. Why, have no clue, and it probably was this way since I created my WordPress blog. Changing the collation for the database, each table and each entry back to UTF8_general_ci took some time, but when I finished I was able to input, save and publish in Chinese. I also hope that all those collation errors will also disappear. I had researched this a couple of years ago and could not come to a proper solution.

While WordPress is relatively simple operate and is a good writing package, it is by no means simple. I have found many small nuances that required much more computer expertise than your average person would know. It is certainly best to have geeky friends.

Leave a Reply

Your email address will not be published. Required fields are marked *