开发者

how to use other encodings with JSON?

I know that JSON_decode only works with UTF-8, 开发者_C百科I want to use characters like this:"ë" how can I achieve that? or there is not way?

THANK YOU FOR YOUR TIME AND HELP.


Just encode the character in UTF-8. It looks like you want U+00EB, or as it's called in the Unicode spec: "LATIN SMALL LETTER E WITH DIAERESIS".

In UTF-8 that is two bytes: c3 ab

Or you can use an string escape: "\u00eb"

You should probably also read Joel Spolsky's article The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!).

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜