字符集与Facebook SDK [英] Charset with Facebook SDK

查看:216
本文介绍了字符集与Facebook SDK的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要与Facebook SDK工作,所以有一定的帮助,我写的脚本,可以找到人的信息。但是,如果在他/她的名字读音符号,它会变形,我试图设置字符集的SDK文件,但它并不能帮助。
结果
例如,如果名字是勒BENES,这将是RENA©BeneĹ。
结果
你能帮助我吗?
结果
谢谢

I needed to work with Facebook SDK, so with some help, I wrote script that can find informations about person. But if there is diacritic in his/her name, it will be malformed, I tried to set charset in SDK files, but it doesn't help.
For example, if the name is René Beneš, it will be RenĂ© Beneš.
Can you help me please?
Thank you

推荐答案

我可以形容,在人物等级,是怎么回事 - 我希望它可以帮助你更接近的解决方案。你显然得到的数据以UTF-8编码,但你的软件间$ P $点作为ISO-8859-2(ISO拉丁语2,东欧)编码。例如,字母e(U + 00E9)是双字节0xc3 0xA9在UTF-8。如果字节是根据ISO-8859-2不当间preTED,0xC3成为和0xA9变得©。

I can describe, at the character level, what is going on here – I hope it helps you closer to a solution. You apparently get the data in UTF-8 encoding, but your software interprets it as ISO-8859-2 (ISO Latin 2, "East European") encoding. For example, letter "é" (U+00E9) is two bytes 0xC3 0xA9 in UTF-8. If the bytes are incorrectly interpreted according to ISO-8859-2, 0xC3 becomes Ă and 0xA9 becomes ©.

所以,你应该尽量让你的软件读取和UTF-8或跨code将其从UTF-8到你使用的编码处理数据。

So you should try to make your software read and process the data in UTF-8 or to transcode it from UTF-8 to the encoding you use.

这篇关于字符集与Facebook SDK的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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