0

I would like to store all the entered information that are written in Arabic in the database. Throughout my searching, I found out that I have to change the collation to utf8_general_ci and in the code I have to put the following statement: mysqli_set_charset($dbh,"utf8");

I gave it try but it didn't work. It still stores the entered information like this هلا

Can someone help me please

4

1 回答 1

1

它仍然像这样存储输入的信息هلا

它不是 mysqli,而是您自己的代码。
您很可能正在htmlentities()处理您的数据。

最好不要使用 HTML 格式在数据库中存储数据,或者至少改变它htmlspecialchars()

于 2013-04-18T09:00:54.433 回答