开发者

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

开发者 https://www.devze.com 2023-03-14 04:27 出处:网络
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'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

精彩评论

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