You are getting strange characters while writing posts in WordPress in hindi or indic languages like Marathi,Gujrati etc ?
I am going to show you a shortcut for WordPress installation to make it display Hindi or other Indic fonts correctly.
Here are steps for this shortcut:
1.Go to root directory of your WordPress installation,there will be a file named wp-config.php
make a backup of it.
2. Now open it in any text editor. When you go through line 30-40 then you got following line
/** Database Charset to use in creating database tables. */ define('DB_CHARSET', 'utf8'); /** The Database Collate type. Don't change this if in doubt. */ define('DB_COLLATE', '');
3. Now put a “//” before
define('DB_CHARSET', 'utf8'); define('DB_COLLATE', '');
then it will looks like
//define('DB_CHARSET', 'utf8'); //define('DB_COLLATE', '');
Some WordPress users reported that Method 1 is not working for them.
Well, Method 2 will work for them.
I have tested method 2 on Apache as well as IIS server.
Open wp-config.php file and make following changes
1. By default WordPress save data in UTF8 format.For Hindi contents to be visible.define Database Charset as follows.
2. Change WordPress Localized Language to Hindi.
Make these changes and save wp-config.php file.Now Hindi and Indic contents should be visible for your WordPress based website.