0

I have a problem on reading Arabic language, when I read arabic text it displayed as a question marks like that

���� ����

Although my php page encoding as Utf8.

And all the table in my database collation Utf8_general_ci.

What should I do ?!!

Fabio
  • 23,183
  • 12
  • 55
  • 64
Sereen
  • 39
  • 1
  • 3
  • 8
  • 1
    What does PHPMyAdmin have to do with this? Are you asking how to configure MySQL+PHPMyAdmin to handle arabic text? Or are you asking how to write PHP to interact with MySQL that handles arabic text? – Quentin Mar 23 '14 at 19:36
  • Also make sure that connection string is also utf8 with `SET CHARACTER SET utf8` – Sarfraz Mar 23 '14 at 19:41

1 Answers1

4

you must set charset in first connect with mysql through this query:

SET CHARACTER SET utf8

for example in mysqli functions

$MySQL_Handle = mysqli_connect(HOSTNAME,DATABASE_USERNAME,DATABASE_PASSWORD,DATABASE_NAME) or die ( mysqli_error($MySQL_Handle) );

$sSQL= 'SET CHARACTER SET utf8';

mysqli_query($MySQL_Handle,$sSQL) or die ('Can\'t charset in DataBase');

this action need before insert and before select.

Aashish
  • 767
  • 8
  • 4