当前位置: 移动技术网 > IT编程>开发语言>Asp > asp实现二进制字符串转换为Unicode字符串

asp实现二进制字符串转换为Unicode字符串

2017年12月12日  | 移动技术网IT编程  | 我要评论
若需要utf-8格式,请自行将下面的gb2312改成utf-8。

' 二进制转字符串,否则会出现乱码的! 
function stb(vin)
        const adtypetext = 2
        dim bytesstream,stringreturn
        set bytesstream = server.createobject("adodb.stream")
 with bytesstream
       .type = adtypetext
       .open
       .writetext vin
       .position = 0
       .charset = "gb2312"
       .position = 2
        stringreturn = .readtext
       .close
   end with
set bytesstream = nothing
stb = stringreturn
end function 

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网