阿拉伯字符不会在phpMyAdmin中显示 [英] Arabic characters doesn't show in phpMyAdmin
问题描述
所以我目前正在开发一个项目,我需要创建一个数据库,其中的记录将保存英文和阿拉伯名字。
使用PhpMyAdmin,其中它的英语名称完全正常,但是所有的阿拉伯语名称显示为?????。
为了解决这个问题,我试图使用设置名称'utf8',但它不工作。 Googling这个问题我意识到PhpMyAdmin不支持阿拉伯语或特殊字符。
我不知道这个问题是否有任何解决方法。
提前感谢
pre> < meta http-equiv =Content-Typecontent =text / html; charset = UTF-8/>
你还要设置列集合类型它应该是相同的utf8_general_ci。更多的表和数据库类型也会考虑一样。
还有一些点要小心如
o在PHP数据库中使用PHP正确读取,写入和排序阿拉伯语文本,请确保:
1- MySQL字符集:UTF-8 Unicode(utf8)
2- MySQL连接排序规则:utf8_general_ci
3-您的数据库和表排序规则设置为:utf8_general_ci或utf8_unicode_ci
然后,当您连接到db时,在您的php脚本中添加此代码:
mysql_query(SET NAMES'utf8'); mysql_query('SET CHARACTER SET utf8');
So I am currently working on a certain project where I need to create a database in which its records will hold both English and Arabic names.
I am creating this using PhpMyAdmin where it works perfectly fine for English names, however all the Arabic names appear as "?????".
To solve this issue I tried to use "set name 'utf8' ", however it didn't work. Googling this problem I realized that PhpMyAdmin does not support either Arabic or Special characters.
I am not sure if there is any workaround for this issue. Do you have any suggestion to solve it ?
Thanks in advance
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
also you have to set column collection type it should be same utf8_general_ci. more over table and database type will also consider as same.
And also some point to be carefull like
o read ,write and sort Arabic text in mysql database using php correctly, make sure that:
1- MySQL charset: UTF-8 Unicode (utf8)
2- MySQL connection collation: utf8_general_ci
3- your database and table collations are set to: utf8_general_ci or utf8_unicode_ci
Then, add this code in your php script when you connect to db:
mysql_query("SET NAMES 'utf8'"); mysql_query('SET CHARACTER SET utf8');
这篇关于阿拉伯字符不会在phpMyAdmin中显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!