阅读与解析unicode json数据在IE和FF中不起作用 [英] Read & parse unicode json data not work in IE and FF
本文介绍了阅读与解析unicode json数据在IE和FF中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想从另一个域(CORS)读取json数据文件.此文件包含Unicode数据,例如:
I want to read json data file from another domain (CORS). This file contain Unicode data, Like:
{"id":21,"name":"پرسپولیس تهران"}
我使用了像这样的JQuery Ajax函数:
I used JQuery Ajax function like this:
$.ajax({
type: "GET",
cache: false,
url: SDomain + 'XML/TeamXMLCache/' + filename + '.json',
dataType: "json",
contentType: 'application/json; charset=UTF-8',
success: parseXml,
error: function (request, status, errorThrown) {
console.log(request);
console.log(status);
console.log(errorThrown);
}
});
这在Chrome 39中可以正常运行,但在IE11和amp;中无法正常工作FF32.
And this work me fine in Chrome 39 but not working in IE11 & FF32.
在IE中,我收到 parsererror 错误.
In IE I get parsererror error.
有关更多信息:
- responseText是:
{"id":21,"name":〜13〜HD3 * G1'F"}
- readyState:4
- statusText:确定"
- 状态:200
最后我的配置文件是:
<configuration>
<system.webServer>
<httpProtocol>
<customHeaders>
<add name="Access-Control-Allow-Origin" value="*" />
<add name="Access-Control-Allow-Headers" value="Origin, X-Requested-With, Content-Type, Accept" />
</customHeaders>
</httpProtocol>
</system.webServer>
</configuration>
所以请告诉我为什么?我不是初学者!
So please tell me why? I'm not a beginner!
查看全文