5

i tried entering Arabic text and insert it into mysql database using php, when print the row, all rows that in arabic looks like :

???? ???? ???? ????? ابو نصير عمان الاردن الاردن بببببببببببببببببب

i set my database to: Character set: utf8 -- UTF-8 Unicode Collation: utf8_general_ci

and every field in database: Character set: utf8 Collation: utf8_general_ci

i need to solve this problem and i appreciate all answers ..

SaidbakR
  • 13,303
  • 20
  • 101
  • 195

1 Answers1

5

Do the following:

  1. Include the following query in every page of your application mysql_query("SET NAMES 'utf8'");

  2. Be assured that your web pages are utf-8 encoded by the following meta tag:

SaidbakR
  • 13,303
  • 20
  • 101
  • 195