ASP program in the same site, if there is a UTF-8 code program, and GB2312 program, after browsing the UTF-8 code page, then browse the GB2312 page, garbled characters are displayed on the page encoded in GB2312.
The problem may be: When you browse UTF-8 encoding, the server outputs html by default using the UTF-8 engine, When you browse the page of GB2312 again, it still uses the UTF-8 to output the page which should be GB2312 encoding. so it will be garbled.
It may be painful to convert them into the same encoding.
Another solution is to keep the original encoding unchanged without any conversion. Add the following in the first line of the Utf-8 program:
CODE:
<% @ LANGUAGE = "VBSCRIPT" CODEPAGE = "65001" %>
<% Session. CodePage = 65001%>
Add
CODE:
<% @ LANGUAGE = "VBSCRIPT" CODEPAGE = "936" %>
<% Session. CodePage = 936%>
This is fine. Of course, if all your programs include a file in the first line, put the above Code in the first line of the file to be included and the problem will be solved immediately.
Session. CodePage specifies which edits the server uses for output. With its declaration, the server will not use the default encoding engine for output.
Solution to garbled code of two sub-sites of UTF-8 and GB2312 of the same asp site