jqgrid是否显示特殊字符? [英] Does jqgrid display special characters?
问题描述
我试图在jqgrid中显示产品列表,但是产品名称有点大并且其中包含特殊字符.并且我尝试做所有事情都没有显示数据.
I m trying to display the product list in the jqgrid but the product names are somewhat big and have special characters in them.And the data is not displayed I tried doing everything.
以前显示的是何时有简单的产品名称. 现在没有显示.特殊字符是一个问题.
Earlier it was showing when there were simple product names. Now it is not showing.Is the special character a problem.
例如:产品名称是:SONOMA life +style®蕨叶&竹香味的4"x 4"柱状蜡烛
Eg : Product name is : SONOMA life + style® Fern Leaf & Bamboo-Scented 4" x 4" Pillar Candle
谢谢 里蒂
推荐答案
您可以考虑使用jqGrid的autoencode:true
选项.默认情况下,输入数据被解释为HTML数据,并且可以包含HTML标记.如果要显示任何文本数据,则autoencode:true
选项可以帮助您显示所有数据.
You can consider to use autoencode:true
option of jqGrid. Per default the input data are interpret as HTML data and can contain HTML markup. If you want to display any text data the autoencode:true
option can help you to display all the data like it be.
此外,您不要忘记使用
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
在您的页面上,以UTF-8格式保存HTML页面,并始终以UTF-8格式从服务器发送JSON/XML数据.
on you page, save the HTML page in UTF-8 format and send the JSON/XML data from the server also always in UTF-8 format.
这篇关于jqgrid是否显示特殊字符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!