inicio mail me! sindicaci;ón

ASP reads the means of settlement that random code problem appears when Sql data

When if you are in,doing a website, cannot carry out Sql statement correctly, after Response, discover the Chinese field inside Sql statement became random code, can solve with the method below:

<%@ Codepage=936%> simplified Chinese

<%@ Codepage=950%> traditional Chinese

<%@ Codepage=65001%>UTF-8

Codepage appointed IIS to be read by what encode take deliver those who come over string string (watch sheet is referred, address column is delivered etc) .

The reason of code giving chaos namely module encode is different when the website wants conformity those who cause.

The most convenient method is as follows:

The code that does not change any module webpages of this Utf-8 still is Utf-8, of this Gb22312 still is Gb2312.

The bag file in Utf-8 module (be like Conn.asp, but should noticing Conn.asp must be call in group) foremost face adds:

<%@LANGUAGE= "VBSCRIPT" CODEPAGE= "65001" %>

<%Session.CodePage=65001%>

In the bag file of GB2312 module foremost face adds:

<%@LANGUAGE= "VBSCRIPT" CODEPAGE= "936" %>

<%Session.CodePage=936%>

Bookmark:Digg Del.icio.us Reddit

Leave a Comment