• Resolved vaibhavbthl

    (@vaibhavbthl)


    Hello

    I have a wordpress blog https://www.rudragems.com with sub domain https://www.blog.rudragems.com both with the latest version of wordpress, with same theme & plugins. My blog is in Hindi language and it is working fine, the problem is with my main site. Instead of Hindi text words it is showing ???? symbols but my sub domain is working fine. I contacted my hosting provider and they told me to contact wordpress support and ask how to enable UTF encode. Please help me out.

    Regards
    Vaibhav Bathla

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi vaibhavbthl,

    I’m sorry they couldn’t provide you with the necessary steps, it’s honestly not a WordPress feature that needs to be enabled, it’s within your database itself. The good news is I can walk you through it.

    It’s actually two steps. The first step is to change your database collation through phpMyAdmin to UTF. This will set any new tables created in your database to UTF.

    The next step is to create a PHP file to convert the existing tables to UTF:

    Convert a Database to UTF-8

    Please note that the script in those instructions converts existing tables to UTF-8. If you want to convert to a different character set/encoding you would need to make the necessary changes to this line of code:

    $sql = "ALTER TABLE $table DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci";

    You would probably also want to alter this line as well so the notification would reflect the other character set:

    print "$table changed to UTF-8 successfully.\n";

    Hope this helps!

    Thread Starter vaibhavbthl

    (@vaibhavbthl)

    Hi ChristiNi

    Thank You for your help. I contacted my hosting provider and they did as you said but still hindi font is not displaying correctly. It is still showing ??? symbol instead of text. My hosting provider said that they have done all the things on server side and if still it is not showing then i need to contact wordpress or my developer. I have no clue why my main website is not showing it correctly but my sub domain is displaying it correctly. Please can you help me out??

    Regards
    Vaibhav Bathla

    Hi Vaibhav,

    I’m sorry you’re still having trouble with your site. Can you give a link to a page as an example? I looked on the main site and everything is appearing in English and I do not see any question marks. While researching this, I also noticed that your main domain’s home page gives a “not found” error.

    Thanks!

    Thread Starter vaibhavbthl

    (@vaibhavbthl)

    Hi ChristiNi

    Following is the link to our About Us page in which i have written both in Hindi & English :- https://www.rudragems.com/about-us/
    This same page is also on our blog only in Hindi language and it is displaying correctly :- https://www.blog.rudragems.com/about-us/

    Main domain is displaying a not found error because i have not updated my website with any content. Currently there is nothing in my website except for 4 pages in the nav bar. I have created many other pages but all are in draft because i need some Hindi text in them.

    I hope you will be able to solve my problem and i greatly appreciate your help. Thank You for your time & efforts.

    Regards
    Vaibhav

    Thread Starter vaibhavbthl

    (@vaibhavbthl)

    Hello

    Finally my problem is solved. I used UTF8 Database converter plugin and this plugin solved my problem. Now hindi language is displaying correctly and so i am closing this post. Thanks ChristiNi for your help and support.

    Regards
    Vaibhav Bathla

    Hi Vaibhav,

    That’s great news! Thanks for pointing out that plugin as well. I tested it out on my WordPress install (version 3.3.1) and it worked perfectly!

    Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How to enable UTF encode in wordpress’ is closed to new replies.