IE8 the background JSON string garbled in the page.

Source: Internet
Author: User

Today encountered a IE8 garbled problem, in the background I used Jsonobject to convert the string array, in the page received is not a JSON string array, but Chinese garbled, in the subsequent version of IE, and Google are no problem, very strange,, debug a bit, Found the foreground page JS in a received backstage string is garbled, looked up a lot of information, said to be IE8 built-in Stringify and parse method, automatically coded UTF8, but also tried a lot of kinds, including the introduction of Json2 (may be I did not lead to success), The final solution is to set the page encoding in the background, Response.setcontenttype ("Text/html;charset=utf-8"), so that solves the garbled problem, got nearly two days of time, although the problem solved, But still do not know how the IE8 in the end is how to transform the data, the other people's IE8 to get the numbers and letters encoded after the string, and my is Chinese garbled, so use the other methods on the Internet is no use, I hope to have to know to say Ah, grateful

IE8 the background JSON string garbled in the page.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.