将编码的字符串转换回正常 [英] Convert encoded string back to normal

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

问题描述


可能重复:

从JSON.Stringify到真正的unicode字符的Unicode字符

看起来Facebook以这种格式保存unicode字符串:

It seems facebook saves unicode strings in this format:


\\\ი\\\პ\\\ო\\ \ვ\\\ე\\\თ \\\პ\\\ა\\\ს\\\უ\\\ხ\\\ი \\\ნ\\\ე\\\ბ\\\ი\\\ს\\\მ\\\ი\\\ე \\\რ \\\კ\\\ი\\\თ\\\ხ\\\ვ\\\ა\\\ზ\\\ე!

\u10d8\u10de\u10dd\u10d5\u10d4\u10d7 \u10de\u10d0\u10e1\u10e3\u10ee\u10d8 \u10dc\u10d4\u10d1\u10d8\u10e1\u10db\u10d8\u10d4\u10e0 \u10d9\u10d8\u10d7\u10ee\u10d5\u10d0\u10d6\u10d4!

如何将其转换回可读字符串?

How can I convert it back to readable string?

推荐答案

Facebook Graph API返回 JSON ,而使用PHP的工具是

The Facebook Graph API returns JSON and the tool to use to make sense of that in PHP is json_decode().

$json = file_get_contents('https://graph.facebook.com/Answersge');
$data = json_decode($json, true);
echo $data['company_overview']; // Outputs: იპოვეთ პასუხი ნებისმიერ კითხვაზე!

这篇关于将编码的字符串转换回正常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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