The problem of garbled characters exists no matter what language, and ASP is no exception. This article will introduce the method of solving garbled characters in ASP. Friends who need it can refer to the problem of garbled characters regardless of the language. The methods of solving garbled characters in ASP are as follows: If the page displays normally , and the data obtained from the data is garbled
For UTF-8 encoding: add it at the top of the ASP script
Copy the code code as follows:
<%@Language=vbscript Codepage=65001%>
And then add it in the <head> area
Copy the code code as follows:
<meta http-equiv=Content-Type content=text/html; charset=utf-8 >
For gb2312 encoding: add it at the top of the ASP script
Copy the code code as follows:
<%@Language=vbscript Codepage=936%>
And then add it in the <head> area
<meta http-equiv=Content-Type content=text/html; charset=gb2312 >
If the output statement is garbled, you need to add this sentence:
Copy the code code as follows:
response.charset=utf-8
If the error message is garbled:
Modify the browser encoding to GB2312, or view the source code