我正在开发一个多语言应用程序,我们使用 utf8_genral_ci 以多语言存储信息。信息正确存储在数据库中,但 json 编码给我的数据格式不正确。
这些是我从服务器得到的
{"Result":[{"id":"1","name":"\u0939\u093f\u0902\u0926\u0940","admin_id":"29","active":"yes","time":"2013-06-04 03:26:47"},{"id":"2","name":"\u4e2d\u570b\u7684","admin_id":"29","active":"yes","time":"2013-06-04 03:27:11"},{"id":"3","name":"fran\u00e7ais","admin_id":"29","active":"yes","time":"2013-06-04 03:27:34"}]}
虽然我想在这些格式中转换/保存结果
{
"Result": [
{
"id": "1",
"name": "हिंदी",
"admin_id": "29",
"active": "yes",
"time": "2013-06-04 03:26:47"
},
{
"id": "2",
"name": "中國的",
"admin_id": "29",
"active": "yes",
"time": "2013-06-04 03:27:11"
},
{
"id": "3",
"name": "français",
"admin_id": "29",
"active": "yes",
"time": "2013-06-04 03:27:34"
}
]
}
提前致谢。