Chinese garbled in ASP page

Two methods

The first: the default is UTF-8 encoding format, as shown in the figure
Insert picture description here

The second: the default is ANSI encoding format, as shown in the figure.
Insert picture description here
For the above two encoding formats, the different solutions are as follows:

  • The first, UFT-8 encoding solution, insert the following code:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>

Insert picture description here

  • The second, ANSI encoding solution, insert the following code:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" >
</head>

Insert picture description here
Test code:

<html>
<head>
</head>
<body>
	<%
	Dim lngSum,I

	lngSum=0

	For I=1 To 100

		lngSum=lngSum+I^2
	Next 
	Response.Write "1到100的平方和" & lngSum
	%>
</body>
</html>

Transfer from:
subeiLY

Guess you like

Origin blog.csdn.net/SwaeLeeUknow/article/details/109151416