ASP page display garbled solution/asp set encoding (GO) If you find the page is garbled. You can try the steps: Make sure your page itself is properly encoded: for example, using Charset=utf-8 in test.asp, make sure the file itself is Utf-8 encoded. You can use Notepad to convert. Also, if you use CHARSET=GBK, make sure that the file itself is GBK encoded.
Verify that the original data (such as the data you get from the database) is encoded in the same way as the page is encoded.
Attempts to specify what encoding IIS reads by.
<%@ Codepage=65001%>utf-8
<%@ codepage=936%> Simplified Chinese
<%@ codepage=950%> Traditional Chinese
<%@ codepage=437%> US/Canada English
<%@ codepage=932%> Japanese
<%@ codepage=949%> Korean
<%@ codepage=866%> Russian
CODEPAGE specifies what encoding is read by IIS.
For example, with UTF-8 encoding, the top of the file is added <% @LANGUAGE = "VBSCRIPT" codepage= "65001"%>
For example, with GBK encoding, the top of the file is added <% @LANGUAGE = "VBSCRIPT" codepage= "936"%>
Set ASP built-in object symbol mapping and response Content-type header encoding
If you use Utf-8 encoding, add the following on top of the article:
<% session.codepage=65001
response.charset= "UTF-8"%>
If you use GBK encoding, add the following on top of the article:
<% session.codepage=936
response.charset= "GBK"%>
Note that you can put the settings indicated in 3,4 to the top of a publicly contained file (for example, conn.asp). This property is applied to all pages.
ASP page display garbled solution/asp set encoding