Problem: Can not write in Japanese and English using WordPress. Characters display as ? ?? ???
I was trying to figure out how to write in Japanese on my WordPress blog. All Japanese characters were coming up as question marks, appearing like “????? ? ?? ???” instead of characters. I searched for a solution to this and found a few plugins that did a ton of unnecessary things, and some didn’t work. I tried out Gengo but I didn’t like it very much. However if you’re reading this for a solution on how to write Japanese and English or translate your page it might work well for you! Here’s the link to Gengo.
If you’re running WordPress 2.2 or higher, then the Collation should be set correctly. Here’s a link to their documentation, and here’s an excerpt.
As of WordPress Version 2.2, DB_COLLATE was made available to allow designation of the database collation (i.e. the sort order of the character set). In most cases, this value should be left blank (null) so the database collation will be automatically assigned by MySQL based on the database character set (i.e. DB_CHARSET). Set DB_COLLATE to one of the UTF-8 values defined in Unicode character sets (utf8 section) (see dev.mysql.com) for most Western European languages.
Now if you are running an older version, or you upgraded from an older version, or for some reason things aren’t working out I’ll post my solution below.
Solution: EASY! First backup your database in case you mess this up. Next use phpMyAdmin and choose a table (wp_posts) and then select the field you want to edit or show Japanese. Let’s say you want your posts to display Japanese, you would edit “post_content” and change the Collation to utf8_unicode_ci. It might have latin1_swedish_ci as the default. You can do this to any field. Posts, comments, categories, etc. Now you can Japanese it up! You can write in Chinese, Korean, whatever character set you’re using most likely. Niiiiiiiiiiiiiice.
If this doesn’t make sense to you then I’ll give you a step by step break down.
- Back up your database. Not sure how? Check out this wordpress database plugin called WP-DBManager.
- Log into your phpMyAdmin
- Choose your database on the left
- Under your database on the left, click on wp_comments
- On the right you’ll see Field, Type, Collation, Attributes, etc.
- For the Fields that have Collation set as something other than utf8_unicode_ci you should tick the check box.
- After you ticked all check boxes in that table, click the pencil icon at the bottom. When you mouse over it there should be a tool tip that says “change”. When you click this you can edit those fields.
- Using the drop down box on each field you can now change the Collation from whatever it is (example latin1_swedish_ci) to the bottom selection in the drop down box which is utf8_unicode_ci.
- Hit Save
- Now click on the next table on the left hand side which should be called wp_links.
- Repeat these steps for each table.
I also found this solution from the wordpress support area.
2.2 update Japanese character problem (“?”)
WordPress, now in 日本語言語!