Complete Script Solutions for Chinese Cat Code when using XMLHTTP POSTGET HTML page

zhaozj2021-02-16  87

I used to post a post in Xmlhttp post form, where my Post E text's value is no problem, but later discovered that POST will garbled when POST contains Chinese form, of course, UTF-8 and GB2312 The conversion problem is!

There are two reasons for the form when using XMLHTTP Post Form - the Chinese garbled when the POST form data; the server Response is incorrectly encoded correctly. In other words, this article mainly solves two problems - how to correct post Chinese content & how to correctly display the meaning of the meaning.

Part I POST Chinese Content

Let's take a look at how the E text is submitted: