0

I have a problem related to Arabic encoding and storing Arabic in to mysql.

i applied all the following steps:

set MySQL charset: UTF-8 Unicode (utf8)

Set MySQL connection collation: utf8_general_ci

Set database and table collations are set to:utf8_general_ci orutf8_unicode_ci

mysql_query("SET NAMES 'utf8'");

mysql_query('SET CHARACTER SET utf8');

however the problem still exist.

Arabic values appear like this in mysql table: أح&Ugr.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
ALBADI
  • 315
  • 2
  • 8
  • 17

1 Answers1

0

(Too many questions for a 'comment'.)

Are you using PHP? If so, use mysqli_* intervace, not mysql_*.

set_charset('utf8') should suffice, not most of the rest of the actions.

Is that supposed to look something like 'ɣɭ&Ugr'? If so, I think you have "double encoding". Please pick some cell in the table and do SELECT col, HEX(col) ... so I can further analyze it.

(I am puzzled, because it looks more like some obscure latin encoding than Arabic.)

"Collation" is not relevant at this point; it may become important as we debug this.

Rick James
  • 135,179
  • 13
  • 127
  • 222