Solution to website garbled code

web front end seven thousand four hundred and sixteen 13 years ago (2011-04-08)

When building a website, one system uses UTF-8, and the other uses GB2312, so it will appear when switching Garbled code Yes, after studying for a long time, it is better to study well.


Basic knowledge:
<%@ codepage=65001%>UTF-8
<% @ codepage=936%>Simplified Chinese
<% @ codepage=950%>Traditional Chinese
<% @ codepage=437%>USA/Canada English
<% @ codepage=932%>Japanese
<% @ codepage=949%>Korean
<% @ codepage=866%>Russian

Codepage specifies the code by which IIS reads

The reason for the garbled code is that the module code is different when the website needs to be integrated.

The most convenient solution is as follows:

Do not convert the code of any module webpage. The utf-8 is still utf-8, and the Gb22312 is still Gb2312

Add the
<%Session. CodePage=65001%>

Add the
<%Session. CodePage=936%>

For other coding analogy, in different coding files, another solution is to create a new corresponding coding file in DW, copy the contents of the original file to the new file, save the name, delete the old file, and replace the old file name with the new file.