BytesToBstr获取的源码转换为中文的代码
程序员文章站
2022-08-06 08:29:57
'================================================== '函数名:bytestobstr '作 用:将...
'==================================================
'函数名:bytestobstr
'作 用:将获取的源码转换为中文
'参 数:body ------要转换的变量
'参 数:cset ------要转换的类型
'==================================================
function bytestobstr(body,cset)
dim objstream
set objstream = server.createobject("adodb.stream")
objstream.type = 1
objstream.mode =3
objstream.open
objstream.write body
objstream.position = 0
objstream.type = 2
objstream.charset = cset
bytestobstr = objstream.readtext
objstream.close
set objstream = nothing
end function
'函数名:bytestobstr
'作 用:将获取的源码转换为中文
'参 数:body ------要转换的变量
'参 数:cset ------要转换的类型
'==================================================
function bytestobstr(body,cset)
dim objstream
set objstream = server.createobject("adodb.stream")
objstream.type = 1
objstream.mode =3
objstream.open
objstream.write body
objstream.position = 0
objstream.type = 2
objstream.charset = cset
bytestobstr = objstream.readtext
objstream.close
set objstream = nothing
end function
上一篇: 用ASP实现分级权限控制
下一篇: asp程序错误详细说明例表