i tried entering Arabic text and insert it into mysql database using php, when print the row, all rows that in arabic looks like :
我尝试输入阿拉伯语文本并使用php将其插入到mysql数据库中,当打印行时,所有阿拉伯语中的行看起来像:
???? ???? ???? ????? ابو نصير عمان الاردن الاردن بببببببببببببببببب
???? ???? ???? ????? ابن†ØμيرعÙ...Ø§Ù†Ø§Ù“Ø§Ø±Ø¯Ù†Ø§Ù”Ø§Ø±Ø¯Ù†Ø¨Ø¨Ø¨Ø¨Ø¨Ø ¨Ø¨Ø¨Ø¨Ø¨Ø¨Ø¨Ø¨Ø¨Ø¨Ø¨Ø¨Ø¨
i set my database to: Character set: utf8 -- UTF-8 Unicode Collation: utf8_general_ci
我将我的数据库设置为:字符集:utf8 - UTF-8 Unicode排序规则:utf8_general_ci
and every field in database: Character set: utf8 Collation: utf8_general_ci
和数据库中的每个字段:字符集:utf8排序规则:utf8_general_ci
i need to solve this problem and i appreciate all answers ..
我需要解决这个问题,我感谢所有的答案..
1 个解决方案
#1
5
Do the following:
请执行下列操作:
-
Include the following query in every page of your application
mysql_query("SET NAMES 'utf8'");
在应用程序mysql_query的每个页面中包含以下查询(“SET NAMES'utf8'”);
-
Be assured that your web pages are utf-8 encoded by the following meta tag:
请放心,您的网页由以下元标记进行utf-8编码:
#1
5
Do the following:
请执行下列操作:
-
Include the following query in every page of your application
mysql_query("SET NAMES 'utf8'");
在应用程序mysql_query的每个页面中包含以下查询(“SET NAMES'utf8'”);
-
Be assured that your web pages are utf-8 encoded by the following meta tag:
请放心,您的网页由以下元标记进行utf-8编码: