读取JSON:"\ u00c5 \ u0082"是什么编码?如何将其获取到unicode对象? [英] Reading JSON: what encoding is "\u00c5\u0082"? How do I get it to a unicode object?

查看:665
本文介绍了读取JSON:"\ u00c5 \ u0082"是什么编码?如何将其获取到unicode对象?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在解析的JSON文件中的值之一是Wroc\u00c5\u0082aw.我怎么能把这个字符串变成一个产生Wrocław"(在这种情况下是正确的解码)的unicode对象?

One of the values in a JSON file I'm parsing is Wroc\u00c5\u0082aw. How can I turn this string into a unicode object that yields "Wrocław" (which is the correct decoding in this case)?

推荐答案

看起来您的JSON编码不正确,因为\ u00c5和\ u0082aw都不产生您期望的任何编码字符.

It looks your JSON hasn't the right encoding because neither \u00c5 nor \u0082aw yields the characters you're expecting in any encoding.

但是您可能会尝试将此值编码为UTF8或UTF16

But you'd maybe try to encode this value in UTF8 or UTF16

这篇关于读取JSON:"\ u00c5 \ u0082"是什么编码?如何将其获取到unicode对象?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆