How can I deal with this encoding?

Posted by Dan on Stack Overflow See other posts from Stack Overflow or by Dan
Published on 2010-04-12T04:33:50Z Indexed on 2010/04/12 4:43 UTC
Read the original article Hit count: 324

Filed under:
|
|

Hi all,

I'm now trying to parse chrome bookmarks, but I encounter a problem. the bookmarks snippet is presented as follow:

    {
        "date_added": "12915566290018721",
        "id": "16",
        "name": "hao123\uFF0D\uFF0D\u6211\u7684\u4E0A\u7F51\u4E3B\u9875",
        "type": "url",
        "url": "http://www.hao123.com/"
     }

the string coding corresponding to name field is stored as "hao123\uFF0D\uFF0D\u6211\u7684\u4E0A\u7F51\u4E3B\u9875", but it should be "hao123--??????" to provide to users. How can I transform "hao123\uFF0D\uFF0D\u6211\u7684\u4E0A\u7F51\u4E3B\u9875" to "hao123--??????"?

thanks!

© Stack Overflow or respective owner

Related posts about encoding

Related posts about JSON