The ASP's system defaults to GB2312, and sometimes the output XML encounters a problem: In most cases, XML is required to be UTF-8 format.
If we directly specify is not enough.
The correct one should be:
<%
Dim originalcoagepage
Originalcoagepage = Session.CodePage ' remembers the original CodePage (default is 936)
Session.CodePage = 65001 ' Set new CodePage (UTF-8)
Response.Charset = "UTF-8"
Response.ContentType = "Text/xml"
%>
...
<%
Session.CodePage = Originalcoagepage ' CodePage recovery
%>
Some of the online session.codepage written response.codepage, this is wrong;
In addition, some of the online does not recover Session.CodePage, most of the cases will cause problems, because in most cases, we do not specify CodePage on other Web pages, once visited the designated CodePage of the page, those who did not specify CodePage The page is also specified according to the CodePage.
Compared with <%@ codepage=936%>, Session.CodePage and only affects the current session.
Note that you must ensure that Session.CodePage = originalcoagepage This sentence can be executed to, do not midway code errors cause the program to terminate without execution.