波斯语在数据库中的话是什么问题? [英] Persian words in the database and it is issue?
本文介绍了波斯语在数据库中的话是什么问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
为什么要在数据库值日期中插入:شهريور
?
如何在数据库(شهريور)中搜索此字?
Why insert in database value date as: شهريور
?
How can search this word in database(شهريور)?
In database: structure => date => varchar(255) => utf8_general_ci = "شهريور".
推荐答案
你不需要html转义那些字符你有一个UTF *表,你做。
You dont need to html escape those characters as long as you have a UTF* table, and you do.
只需确保表是UTF8,连接是utf8,浏览器读取文本utf8。
Simply make sure that the table is UTF8, that the connection is utf8, and the browser reads the texts as utf8.
- for mysql see
SET CHARACTER SET
,SET NAMES ,
,
SET COLLATION_CONNECTION
- html使用
< meta content = / html; charset = UTF-8http-equiv =Content-Type/>
和相应的http标头
- for mysql see
SET CHARACTER SET
,SET NAMES
,SET COLLATION_CONNECTION
- for html use
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type" />
and the according http headers, if needed
这篇关于波斯语在数据库中的话是什么问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文