Two solutions for asp+ Chinese display
The author just began to write asp+ program when encountered the first big problem is the Chinese display problem, run found asp+ from the database to read out of all the Chinese into the?????, a bit like JSP in this frequency appears the highest Chinese display problem, Check the data found a way to easily solve the Chinese problem.
Method One:
After browsing through the Microsoft NGWS document, I found that there is a reference in the FAQ section of the document to add a Config.web file to
Web directory, try it, the Chinese display is OK.
The method is as follows:
Create a file Config.web, as follows, in the web directory
Requestencoding= "Utf-8"
Responseencoding= "Utf-8"
/>
Later on the internet to see someone posted in the forum said will Utf-8 replaced gb2312 seems to be able to, the author has not tried, we can try.
Method Two:
Later subscribed to Microsoft's newsgroups and found in Microsoft's newsgroup dotnet.framework.aspplus.general that there was discussion of this
An issue of the article, the method for adding <%@ CODEPAGE = "936"%> to the beginning of each page, somewhat similar to the JSP in the
<%@ page contenttype= "text/html;charset=gb2312"%>
Quickly tested it, sure enough!!!
Examples are shown below:
<%@ CODEPAGE = "936"%>
<%@ Import namespace= "System.Data"%>
<%@ Import namespace= "System.Data.ADO"%>
<%@ Import namespace= "System.Globalization"%>