InMotion Hosting Support Center

Trouble Displaying Arabic Text
2012-12-02 6:11 am EST

Hits: 2,665

I have this website, where I'm facing troubles displaying arabic text. Arabic text shows (?????) question marks only.

I had two sessions of chatting with support, but, no resul so far.

These options have been tested and didn't solve the issue:

1. No database connection is actually established for Arabic text. All arabic text is static, no database entries. So, database encoding isn't an issue.

2. The site is based on wordpress, encoding in settings is set to "UTF-8".

3. added a default charset to htaccess to UTF-8.

4. Resent the headers using PHP with UTF-8 encoding.

5. changed the PHP.INI in my hosting root directory and also under this account root directory and changed the encoding from ISO to UTF-8.

So, all the above did not solve the issue.

Also, I have created two testing pages, with exactly the same text inside (in arabic): and .. both were the same pages, I just changed the extensions of the files. The html works fine and displays arabic. The php one doesn't work.

This is basically the issue.

If anyone has any other option for me to try or know how to go about doing this, please let me know!

Thanks and have a great day everyone!

You must login before you can ask a follow up question.

You must login before you can submit an answer.



5,889 Points
2012-12-03 10:49 am EST
Thank you for your question!

This happens when the php mbstring and the default charset is not set to UTF-8. If you look at the following in your php.ini, you will see the following.

   ; internal/script encoding.
   ; Some encoding cannot work as internal encoding.
   ; (e.g. SJIS, BIG5, ISO-2022-*)
   ;mbstring.internal_encoding = EUC-JP

   ; PHP's built-in default is text/htmldefault_mimetype = "text/html"
   ;default_charset = "iso-8859-1"

Make sure you uncomment (remove the ; from in front of the line) the following lines and set them to UTF-8.

   mbstring.internal_encoding = UTF-8
   default_charset = "utf-8"

You will need to make the php.ini recursive.

<a href="" target="_blank">How can I make my php.ini file recursive ?</a>

After you follow those steps the characters will start working.

Take Care!

James R

You must login before you can post a comment about this answer.

Like this Question?

Forum Login

You are NOT logged in. You can still browse our Support Center.

To participate within our Community Support Forum:

Need more Help?

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail:
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!