Jun/092
Cyrillic Letters Turning Into Question Marks in WordPress
The Problem
One client had the requirement of having an English language blog, but with a few words of Russian thrown in for good measure. However, as soon as she tried to save any of her posts, any characters in the Cyrillic script (i.e. the strange Russian ones) were converted into question marks. What was the cause of this? Hunting and scouring initially produced no useful results – all the documentation pointed to WordPress being able to handle such letters and searches based on WordPress and Russian as keywords just produced localisation projects converting the whole WordPress interface into Russian. Or it was stuff in Russian that I didn’t understand. Eventually I stumbled upon a discussion on the WordPress forums that explained it all – the issue was in the database.
The Solution
The issue was that Fantastico scripts used to create the database structure (as opposed to using the wordpress standard install scripts) gave databases in format latin1_swedish_ci (the later gives utf8_general_ci). As the blog hadn’t been used I just recreated it with the standard install and it was fine. A fix requiring preservation of existing data might be to back up the database (Tools->Export) in the admin interface, delete and recreate WordPress with the correct tables and then see what happens!
Just goes to show that the famous WordPress 5-minute install script is the way to go (even if the file upload take more time)!
Leave a comment
No trackbacks yet.
8:50 am on February 17th, 2010
I had the same problem with the question marks. The wordpress standard-installation was also with latin1_swedish_ci. I don’t know why. I’ve changed all the tables and fields in the database also to utf 8 – now all works well
2:44 am on March 23rd, 2010
Actually upon install you can set the database character set in the config file – this should be the default as is provided in the config sample.
/** Database Charset to use in creating database tables. */
define(‘DB_CHARSET’, ‘utf8′);