0

after a week searching and test many way, still i stuck in this problem. a problem like this POST. i tried with that answer but my problem still not solved.

ok, let me explain. i trying to insert some utf-8 (persian/arabic), i have to mention this that i have not any problem with these character in my html/php page, this mean all un dynamic character are ok.

input is:

دوشنبه , ۱۱ اسفند ۱۳۹۳ , ۲۲:۲۵

in database is:

دوشنبه , Û±Û± اسÙند Û±Û³Û¹Û³ , Û²Û²:Û²Ûµ

output:

دوشنبه , ۱۱ اسفند ۱۳۹۳ , ۲۲:۲۵ �

it contains " � "

if i edit this field in database and enter new data, it will like this:

دوشنبه , ۱۱ اسفند ۱۳۹۳ , ۲۲:۲۵

but in output will show:

????

i tried many way, like SET NAMES 'utf8 and ini_set("default_charset", "UTF-8"); and etc.. but still have this problem.

Community
  • 1
  • 1
ITSolution
  • 398
  • 2
  • 9
  • 21
  • what is the encoding of the database table you're inserting the records in? – Tivie Mar 02 '15 at 19:18
  • CHARACTER SET utf8 COLLATE='utf8_persian_ci'; @Tivie also tested with general_ci – ITSolution Mar 02 '15 at 19:19
  • http://stackoverflow.com/questions/202205/how-to-make-mysql-handle-utf-8-properly http://php.net/manual/en/mysqli.set-charset.php `header('Content-type: text/html; charset=utf-8');` `utf8_decode($content)` – Matt Mar 02 '15 at 19:25

0 Answers0