Tutorial :Wordpress COMMENTS IN URDU (other language)


I am working on a wordpress project. The my database is in utf general. It seems everything is fine in database side, the rest of the website is working wel except the comments. When i display comments wordpress just display symbols rather than words can anyone help me?

http://www.freeimagehosting.net/>http://www.freeimagehosting.net/uploads/67cbb3183f.jpg border=0 alt="Free Image Hosting">


First off, check that these symbols aren't actually in the database - this usually happens during an import/export between databases.

If everything is fine, check that a Content-Type header is being sent like so (I use HttpFox);

Content-Type: text/html; charset=UTF-8  

Also, but don't hold me to it, I have read some (older) browsers still need a Http-Equiv tag in the HTML <head />;

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />  

And make sure your database connection is also UTF-8 - with MySQL, use SET NAMES.

WordPress should already be doing most of this, but no harm in checking.


In addition to all that TheDeadMedic has said, make sure that:

  • In your wp-config.php, you set define(‘DB_CHARSET’, ‘utf8′);
  • The SQL connection has SET NAMES UTF8

I've had a case where the second could not be done, and ultimate character sets returned to normal by me taking out define(‘DB_CHARSET’, ‘utf8′);, however.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »