关于字符串转换问题,请各位帮个忙!
有一个二进制数据,当我用 response.binarywrite SrcData 可以正常显示到页面,我尝试在网上搜索到一个转换函数
Function bin2str(binstr)
Dim varlen,clow,ccc,skipflag
skipflag=0
ccc = ""
If Not IsNull(binstr) Then
varlen=LenB(binstr)
For i=1 To varlen
If skipflag=0 Then
clow = MidB(binstr,i,1)
If AscB(clow) > 127 Then
ccc =ccc & Chr(AscW(MidB(binstr,i+1,1) & clow))
skipflag=1
Else
ccc = ccc & Chr(AscB(clow))
End If
ccc = ccc & Chr(AscB(clow))
Else
skipflag=0
End If
Next
End If
bin2str = ccc
End Function
用这个函数转换出来再用 response.write SrcData 打印到页面不正常,也许我没有转对,请大家帮个忙!谢谢!