Hi! I have the same problem.
My wp-config.php file looks like the one that elsewhere pasted in http://wordpress.pastebin.ca/523862
What am I supposed to do? Just remove DB_CHARSET and DB_COLLATE from my wp-config.php file? The post-deletion problems reported by the others sound scary.
Well, I had DB_CHARSET and DB_COLLATE in my file and then had all mess code. Then I removed them and 95% of my blog when back to normal Chinese. However, some plugins like wp-email were corrupted and now show ????? for all Chinese characters. I need to now re-translate that and some smaller things.
Not a big nightmare for me, but definitely quite a hassle and loss of time and energy 🙁
Same here, i have big problem now! I did a upgrade to 2.2 by Fantastico last night, and all the Chinese turn into ????. However i read from other’s blog, knowing that i need to change all the database’s collation to utf8_general_c. I did that too, but it was not working. I found some says need to edit wp-config.php file, so i did and it was even worse.
I managed to return back to 2.1.3, and it was a mess. The support from my Host suggested me to remove wordpress and reinstall again. I did removed the 2.1.3 but not able to install the wordpress 2.2 as i can’t install two wordpress in the same domain. (funny! I did removed the old installation right? and there is no wordpress installed in my Fantastico).
Anyway when i assess my blog, the page was blank and asked me to do the installation. So i follow the steps and manage to install the 2.1.3. back. Now, the Chinese text still unreadable and many other errors too. I can’t use the ‘manage’ tool now, and i have two error messages:
Fatal error: Call to undefined function get_private_posts_cap_sql() in /home/clblogne/public_html/wp-admin/index.php on line 64
Fatal error: Call to undefined function _get_category_hierarchy() in /home/clblogne/public_html/wp-admin/admin-functions.php on line 771
Sorry for the long story, but can someone help? I really don’t know what to do now!
I think I figured it out now. Here’s what I did:
1. Installed fresh version of WP2.2
2. Checked database via phpMyAdmin which I can access via my cpanel (server control software; most people using a virtual server has the same setup I think)
2a. Here I was a bit confused by all the advice flying around in this forum about changing the database character set or something like that. Now I see where I was confused. At the top level of phpMyAdmin, on the first screen that appears, I checked to be sure the settings for LOCALHOST were:
MySQL charset: UTF-8 Unicode (utf8)
MySQL connection collation: utf8_unicode_ci
Here’s where it is a bit confusing…if I opened the actual database for this Chinese blog (I am running several different databases within the same master database), it shows the collation as latin_swedish_ci. It lists this for each separate part of the database such as categories, posts, comments, etc. I did NOT bother changing this at all, as it has no effect, at least on this situation.
I then exited from phpMyAdmin.
3. I then edited the standard wp-config.php file as the moderator mentioned above. I removed the two lines:
4. Check the end of the wp-config.php file now. You should see a ?> and there should be NOTHING after it…no blank lines or even one single blank space! As it turns out, this was the cause of the problem I described above where I was constantly getting an error of “Warning: Cannot modify header information – headers already sent by (output started at /home/…”. I don’t know how the extra blank line and blank space got added to my wp-config.php file. It seems that my html editor added this when I opened the file to delete the two lines. Or maybe it has something to do with the way I downloaded the file. I am not sure, but anyways, make sure you do not have this problem on your file before you save it and then upload it.
5. I then uploaded the modified wp-config.php file and everything worked perfectly, i.e. Chinese characters displayed correctly and no strange error message appeared.
6. So far it seems like everything works fine. I have not found any problems or conflicts yet.
7. One final point: I tried all the other methods mentioned in this forum to solve the Chinese ???? problem and NONE of them worked except this one.
Hope that helps everyone! 加油!
Thanks for the information Thomas. In 2a, you said you
…I checked to be sure the settings for LOCALHOST were:
MySQL charset: UTF-8 Unicode (utf8)
MySQL connection collation: utf8_unicode_ci
Did you change to those values or were they already set that way?
Those were the existing settings so it seems that those are the default settings for my server’s MySQL databases.
Thank you Thomas for sharing the solution. It works!
“What Can’t Kill You, Will Make You Stronger”
Hmm, that’s all very interesting but unfortunately doesn’t work for me.
Here’s what happened with my wordpress install:
I upgraded to 2.2, leaving the config file untouched. Now when I look at posts that contain Chinese characters, they randomly display as “ä??” in FireFox or as “ä” and two square bullets with a question mark in Safari. When I edit the post, however, everything is displayed totally correct? For an example, check http://www.towfigh.net/emanuel/categories/hanyue
Any idea for a remedy?
Thanks in advance…
Found the solution, in case anyone else has similar problems: The plugin “o42-clean-umlauts” in its current 0.2.0 version is incompatible with WP2.2
I was having a similar problem with Japanese and I followed Thomas’s suggestion and that worked (thank you). But I am wondering if by removing the following lines if that has caused problems with the RSS feed because the xmlrpc.php file goes to the wp-config.php to find the charset which has now been removed.
When I go to validate my feed I get the following error:
XML Parsing Error: syntax error
Line Number 1, Column 31:<?xml version=”1.0″ encoding=””?>
I think it has to do with the encoding which is why I am posting in here. I was wondering if anyone else was having this problem or if you perhaps knew of a solution?
Thank you for the great information.
Thanks thomasw98! It really works…
In fact, I just started blogging with WordPress 2.2 few days ago and I found the problem. I thought it should be my problem only since I can see many chinese blogs around using WP as well. Who knows, it’s 2.2 version’s fault.
But, as carrasco mentioned, will it affect RSS?
Thanks, thomasw98. I was having same trouble with Japanese script not showing up properly. However, trying thomasw98’s suggestions did not solve the problem for me.
The config.php file says
“// Change this to localize WordPress. A corresponding MO file for the
// chosen language must be installed to wp-content/languages.
// For example, install de.mo to wp-content/languages and set WPLANG to ‘de’
// to enable German language support.
define (‘WPLANG’, ”); “
I don’t have a folder <languages> in <wp-content>. Should I have?
Also, I’m using cPanel’s File Manager. How do I install an “mo” file? Where do I get it from? Do I need the Japanese MO file? Where do I get it from?
No and no and no…
1. Your blog is in English – you don’t need any .mo file.
2. Don’t copy paste from Japanese source that is NOT utf-8 encoded. Type (if you can) your Japanese words/text as you do with the Englsih and it should show up correctly.
3. thomasw98 was NOT referring to the portion of the wp-config that you quoted above!
4. If you did an automatic upgrade to Wp 2.2 – then you have to delete the two lines from the wp-config:
define('DB_CHARSET', 'utf8'); define('DB_COLLATE', '');
What thomasw98 said earlier here is what happening to me. My host said default charset of latin_swedish_ci can’t be changed and if I want to alter collation I have to get into each and every table and change it manually. I did that for one of my sites, too troublesome. Alternative solution would be exporting your db, create new db (with the charset and collation you want at top level) and import again. That’s also scary and risky and your site will be down for a while.
I just wondered if there are geeks for MySQL around who may know a way to alter collation for all tables in a database, say by running a script file or something like that.
If that’s possible perhaps a plugin for non-English users of WP would welcome that.
- The topic ‘Unicode chinese turn into symbols after upgrade to wp2.2’ is closed to new replies.