fql查询字符编码 [英] fql query character encoding

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

问题描述

我正在执行一个FQL查询,如果我打印的数据结果我得到错误的字符。

I am executing a FQL query, and if I print the array with the results I get wrong characters.

例如,而不是ò 我得到ò。

我的网页设置为: text / html的; charset = ISO-8859-1

我认为这是一个Facebook的问题,而不是与我..你有没有经历过类似的事情,解决方案

I think it's an issue with facebook and not with me.. Have you experienced something similar and did you manage to solve it?

推荐答案

Facebook的结果在 UTF-8 encoding。

The results from Facebook are in UTF-8 encoding.

ò字符是UTF-8(十六进制)中的 c3b2 0xC3 - Ã 0xB2 - ²

将结果转换为 PHP中的 UTF-8 中的ISO-8859-1 可以使用 utf8_decode 功能:

To convert the results to ISO-8859-1 from UTF-8 in PHP you may use utf8_decode function:

$source = chr(0xc3).chr(0xb2);
$result = utf8_decode($source); // -> 0xF2 (ò in ISO-8859-1)

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

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