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

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

若需要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 

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

相关教程推荐

其他课程推荐