28,404
社区成员
发帖
与我相关
我的任务
分享
Session.CodePage = 936
Response.Charset = "GB2312"
Session.CodePage = 65001
Response.Charset = "utf-8"
'字符转换
Function bytes2BSTR(arrBytes)
strReturn = ""
arrBytes = CStr(arrBytes)
For i = 1 To LenB(arrBytes)
ThisCharCode = AscB(MidB(arrBytes, i, 1))
If ThisCharCode < &H80 Then
strReturn = strReturn & Chr(ThisCharCode)
Else
NextCharCode = AscB(MidB(arrBytes, i+1, 1))
strReturn = strReturn & Chr(CLng(ThisCharCode) * &H100 + CInt(NextCharCode))
i = i + 1
End If
Next
bytes2BSTR = strReturn
End Function