Hello Everyone,
I am developing a new website which shall provide a user interface of multiple languages; starting with English, Persian and Arabic (We are considering Russian and Hebrew in addition to other languages in the 2nd phase).
What I have done is to store a language code with the relevant charset and CSS filename in a table and based on the session variable and selected language, the the PHP code will issue a header command with the required charset,
header("Content-type: text/html; charset=windows-1256");
The issue is with the display of the arabic language encoding even though I have used the three possible charsets:
- windows-1256
- utf-8
- iso-5988-6
by the using the UTF8, the site header displays properly, but the other parts shows wrong letters. By using the windows-1256, a part of the site display properly, but the title and others are not shown. The displayed data (correct on at this part) is being retrieved from mySQL DB.
BTW, I have added the following code after a successful connection to the database:
mysql_query("SET NAMES 'utf8'");
mysql_query('SET CHARACTER SET utf8');
I need to mention, that I am using "include" for some parts of the website.
Can you help me to change the charset for all the pages and parts and resolve this issue?
Thanking you in advance,
Aziz