1. ASP. net is flexible, thanks to the text file configuration method. in addition, the method of using page identifiers should be extended from ASP. when writing ASP + programs, I encountered a Chinese display problem. After running the program, I found that all the Chinese characters read by ASP + from the database were changed ?????, Solution:
Method 1:
Set the globalization segment in config. Web
<Configuration>
<Globalization
Requestencoding = "UTF-8"
Responseencoding = "UTF-8"
/>
</Configuration>
It can be UTF-8, gb2312, and so on.
Method 2:
Later, I subscribed to Microsoft's newsgroup and found it discussed in Microsoft's newsgroup DOTNET. Framework. aspplus. General.
To add <% @ codePage = "936" %> to the beginning of each page.
<% @ Page contenttype = "text/html; charset = gb2312" %>
Hurry up and test it. OK !!!
The example is shown below:
<% @ CodePage = "936" %>
<% @ Import namespace = "system. Data" %>
<% @ Import namespace = "system. Data. Ado" %>
<% @ Import namespace = "system. Globalization" %>
<HTML>
<Head>
<Meta http-equiv = "Content-Type" content = "text/html; charset = gb2312">
Generally, after opening the interface with dereamweaver with vs. net2003, the Chinese characters in the interface become garbled. It took several minutes to finally find a solution.
Add the code in Web. config.
. <Globalization
Requestencoding = "gb2312"
Responseencoding = "gb2312"
Fileencoding = "gb2312"
/>
Or
<Meta http-equiv = "Content-Type" content = "text/html; charset = gb2312">
Garbled characters after release
2 javescript: encodeuri ('string', 'gb2312 ')