Arabic text output php mysql utf-8 conversion issue

Viewed 6054

I'm importing data from Oracle database to MySQL tables.

I have set my MySQL table charset as utf8_general_ci and database and table name with field column value set as utf-8 as well.

Now, When I fetch the result, it prints like, which is with ? sign:

مرحبا العال� - 5

I have my utf value in column is مرحبا العالÙ

When I compare this string with Oracle string, it shows proper value - exact copy of Oracle database and there it shows perfect string in Arabic.

I have set my html meta with utf-8 as well

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" >

If I set mysql query as below, it shows junk characters:

mysql_query("SET NAMES utf8;");
mysql_query("SET CHARACTER_SET utf8;");

Followed everything possible found over stack and other sites, and still getting an error.

Please help !

2 Answers
Related