上图access里的中文很清晰。没乱码的。就是读出来后显示乱码。
我直接用asp测试。也能正确显示。
下面是asp的代码:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>
<body>
<%
dim conn,connstr
'on error resume next
connstr="DBQ="+server.mappath("hndb.mdb")+";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};"
Set conn=Server.CreateObject("ADODB.CONNECTION")
conn.open connstr
Set rs=Server.CreateObject("ADODB.RecordSet")
sql="select * from news where id=20 order by id desc"
rs.Open sql,conn,1,1
if rs.eof and rs.bof then
response.Write("没有记录")
else
response.Write( "有记录" )
end if
%>
<% = rs("content") %>
</body>
</html>