Trouble Displaying Arabic Text

  • Answered

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!
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. How can I make my php.ini file recursive ? After you follow those steps the characters will start working. Take Care! James R