当前位置:首页 > ASP教程 > 应用技巧

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
【说明】本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:)!