显示乱码,如何解决?(0分)

D

dotboy

Unregistered / Unconfirmed
GUEST, unregistred user!
我用ASP做查询,使用ADO连接MS SQL7英文版,查询结果为何显示出来中文是乱码?
 
检查sql的语言设置
检查asp的编码设置
 
不好意思,我是新手,刚学ASP,查询结果中文显示为乱码,帮我找找原因,谢谢。
ODBD数据源语言设置为英文。
ASP文件源码为:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body>
<%
set conn=server.createobject("ADODB.CONNECTION")
conn.open "testdatabase","testuser","testpassword"
sqlstr="select * from patients where pat_in_no='116125'"
set recordset=conn.execute(sqlstr)
do while (not recordset.eof)
%>
<table width="100%" border="1"><tr>
<td><%=recordset("pat_sid")%></td>
<td><%=recordset("pat_name")%></td>
<td><%=recordset("pat_sex")%></td>
<td><%=recordset("pat_age")%></td>
<td><%=recordset("pat_d_name")%></td>
</tr></table>
<%
recordset.movenext
loop
%>
</table>
<%
conn.close
%>
</body>
</html>
 
问题在sql服务器上
我这样认为
你的asp代码没有什么问题
 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
看看结果如何
 
还是不行,大虾们帮我呀?
 
顶部