开发者

Does jqgrid display special characters?

开发者 https://www.devze.com 2023-02-21 01:50 出处:网络
I m trying to display the product list in the jqgrid but the product name开发者_高级运维s are somewhat big and have special characters in them.And the data is not displayed I tried doing everything.

I m trying to display the product list in the jqgrid but the product name开发者_高级运维s 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.

Eg : Product name is : SONOMA life + style® Fern Leaf & Bamboo-Scented 4" x 4" Pillar Candle

Thanks Riti


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.

Moreover you should not forget to use

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

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.


You also have to utf8_encode("string") your string in PHP.


Recently ran upon the same problem.

The encoding of the HTTP header and the byte-order mark of your html file might also matter. There is a guy with a similar problem here - http://codemerx.com/jqgrid/forum/jqgrid-standalone/2-special-characters-in-jqgrid

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号