on July 11, 2010 by Adam in Interesting, Comments (2)
我为什么不能写中文?
我以前不能打中文字在这个网站因为我的数据库表默认是‘latin1_swedish_ci’. 我就改变到‘utf8_general_ci’ 就可以放中文字。I was wondering why I couldn’t use Chinese on this blog, and it turns out I had to go into phpMySQLAdmin and change the default collation in particular for my wordpress posts table post_title and post_content fields. (See image)
Now you, too, can type Chinese on your WordPress blog!
Jonathan David Page
July 11, 2010 @ 10:35 pm
Okay, NONE of those should be latin1_swedish_ci… ideally, all tables should be set up to be utf8_unicode_ci by default.
For some reason, latin1_swedish_ci seems to be the default. It’s very strange, and very silly, considering that this is 2010 and utf8 takes up no more space than ANSI for latin1 text.
Btw, there are probably other fields that you need to change if you want people to be able to comment in Chinese.
Adam
July 12, 2010 @ 7:40 am
true, I think they were in the wordpress_comments table. did you have this problem as well? 你好吗?