开发者

How to work with UTF-8 numeric encoded from Zend_Json in JS?

I'm using Zend_Json (actually, I'm using ajaxContext with automatic json serialization), and I need to send Japanese chars encoded in Utf-8.

I开发者_高级运维 receive from my ajax request such data :

{"comments":"\\u65e5\\u672c\\u6700"}

Now, what can I do with that? to "translate" it into readable chars in my html page?

thank you


You can use jquery json parser for decode chars.

jQuery.parseJSON(response);

This function convert encoded chars to readable chars in html.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜