Home » Wordpress

Unicode problem in wordpress

[By: Kedar Sapkota | 8 June 2010 | 2,509 views | 7 Comments ]

I previously had some problems when I mixed Unicode with WordPress. Every time I typed a Unicode character, (after posting) it would display as a ???. This post will describe how to fix this.

Basically, the problem is that WordPress is not comprehending this, and instead of telling the database to store the Unicode characters, it just says, ?Heck, just stick a bunch of question marks in there.?

Of course, this can be easily fixed in two steps. All you?ll need is FTP access to your server and a fair comprehension of how to type. So, let?s get started!

1. Open up ?wp-config.php? from the root directory of your WordPress installation.
2. Add ?//? at the very beginning of these two lines:
define(?DB_CHARSET?, ?utf8?);
define(?DB_COLLATE?, ?);

So that section should now look like this:
//define(?DB_CHARSET?, ?utf8?);
//define(?DB_COLLATE?, ?);

You?re already finished. How easy was that?

Important notes:

1. The quotes surrounding // in step 2 should not be inserted. Those are just indicating that the // is the part you should insert.
2. If you?ve meddled with that part of ?wp-config.php? before, it may look a bit different. But pay no attention to the differences. Just be sure add // to the lines containing DB_CHARSET and DB_COLLATE.

Share this nice post:

Leave your response!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.


eight - 8 =