首页 电脑 电脑学堂 查看内容

ASCII转化为Unicode

2009-5-20 13:02 697 0

摘要: Function ASCII2Unicode(str)dim strLen,res,IstrLen=LenB(str)I=1While I < strLen+1   If I...
关键词: nbsp str AscB MidB res Function strLen ASCII2Unicode WendASCII Unicode

Function ASCII2Unicode(str)dim strLen,res,IstrLen=LenB(str)I=1While I < strLen+1   If I<>strLen And AscB(MidB(str,I,1))>127 Then    res=res&Chr(AscB(MidB(str,I,1))*256+AscB(MidB(str,I+1,1)))    I=I+1   Else    res=res&ChrW(AscB(MidB(str,I,1)))   End If   I=I+1WendASCII2Unicode=resEnd Function
声明:文章版权归原作者所有 部分文章转自互联网 如有侵权请联系 [邮箱地址] 删除

路过

雷人

握手

鲜花

鸡蛋

最新评论

返回顶部