Jquery's powerful functions have become more and more popular among many friends. However, Ajax is a little too difficult to take care of the feelings of the Chinese people.
Data Transfer Encoding only supports UTF-8, although it is a globally unified code, but also consider the Chinese name local website encoding problem
In addition, on the sending end of jquery, no matter whether you have set the program-level encoding or page-level encoding, jquery uses UTF-8 encoding to pass through
Some websites are operating a long event, it is indeed a little difficult to completely modify the UTF-8, good complaints sent here, below is a solution example written by myself
Hope to help you.
Principle:
Use the escape method on the ajax sender. Then use the unescape Method for conversion at the receiving end
Example:
Gb2312.html
- <Html>
- <Head>
- <Meta http-equiv % 3