问题描述:

My website is using JSON.strigify() function to make json data.

But I get different results between browsers with utf-8 characters.

On IE8:

{"StrData":"","ObjData":"edit_Comment2=17\u00feedit_Comment=\u00b6and;\u00felstApplyManualGroupContent=36\u00femanual_group_id=36\u00fe__RequestVerificationToken_Save__=i8d1tFedRwFylC91Q2m7Xbvcsmj5ySOnuTKAGN84xt9TAPBjc6Tii3LaS7ZYIzrnDFc2Vwc+x3K53f8sarlZhjXDMvHveRkxdQMEulqRQaGjAHeBX64DL6TL6mr0bmudYtRjNvlQcQ9QYyjApZ8yqRT0KZT+OaNV0GkYbr85MwNZI0Su7shl8nd5RzDcex8UhmhnVpmo+Z2Frv0VZX1yzQ==\u00felang="}

On other browsers:

{"StrData":"","ObjData":"edit_Comment2=17þedit_Comment=¶and;þlstApplyManualGroupContent=36þmanual_group_id=36þ__RequestVerificationToken_Save__=4fkNJX11tylbaIvBF+vg1p54qTEQTj9ZKBF1WXiDaM4cMp45/aY9AUnqxUItTuWXAG7tTxBb6PpiYighB6YO9KP6gfJdSvoSwuh5eFhnYXpiL2ectL5CrrYk9MeC0Q9Fn3ySr1i7uYaBKI2fQUbUErKL76bmpMehtXkGvzF8cfFa++eUa2r2T5429/YFnBjx2UGmBgqkye0s6tu409KnQQ==þlang="}

But when I use ajax to send this data on server, firewall will block it on IE8.

I am trying to use unescape() function, but it only work with string, not work with json data.

How can i unescape data on IE8 to make it same with results on other browsers.

网友答案:
Use eval(' + jsonData+ ') will fix this issue..
相关阅读:
Top