asp 读取汉字的文本文件显示乱码

来源:百度知道 编辑:UC知道 时间:2024/05/17 03:31:21
我用asp读取文本文件,内容是汉字时显示乱码,假如是数字或是字母则正确显示,请高手帮帮忙,在线等...
源码如下:
<%
set fso=Server.CreateObject("Scripting.FileSystemObject")
filepath=Server.MapPath("data\message.html")
Set fin=fso.OpenTextFile(filepath,1,True)
Do While not fin.AtEndOfStream
str=fin.ReadLine
if str<>"" then
Response.Write str
Response.Write "<br>"
end if
loop
fin.Close
Set fin=Nothing
Set fso=Nothing
%>

网页头部中加入一句:

<meta http-equiv="Content-Type" content="text/html; charset=gb2312">

你好!
你所说的题目应该这么修改才可以:
网页头部中加入一句:
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
以上仅供参考,谢谢!

呵呵,好难啊

。。

吕布建设路噜噜噜亏数据库两块五涂涂乐普通噜噜噜噜噜噜5句老婆老婆聚聚