最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

轉(zhuǎn)換中文為unicode 轉(zhuǎn)換unicode到正常文本

 更新時(shí)間:2006年09月01日 00:00:00   作者:  
復(fù)制代碼 代碼如下:

'//轉(zhuǎn)換中文為unicode
function URLEncoding(vstrIn)

    dim i
    dim strReturn,ThisChr,innerCode,Hight8,Low8

    strReturn = ""
    for i = 1 to Len(vstrIn)
        ThisChr = Mid(vStrIn,i,1)
        If Abs(Asc(ThisChr)) < &HFF then
            strReturn = strReturn & ThisChr
        else
            innerCode = Asc(ThisChr)
            If innerCode < 0 then
                innerCode = innerCode + &H10000
            end If
            Hight8 = (innerCode  and &HFF00)\ &HFF
            Low8 = innerCode and &HFF
            strReturn = strReturn & "%" & Hex(Hight8) &  "%" & Hex(Low8)
        end If
    next

    URLEncoding = strReturn

end function

'//轉(zhuǎn)換unicode到正常文本
function bytes2BSTR(vIn)
    dim i
    dim strReturn,ThisCharCode,nextCharCode

    strReturn = ""
    for i = 1 to LenB(vIn)
        ThisCharCode = AscB(MidB(vIn,i,1))
        If ThisCharCode < &H80 then
            strReturn = strReturn & Chr(ThisCharCode)
        else
            nextCharCode = AscB(MidB(vIn,i+1,1))
            strReturn = strReturn & Chr(CLng(ThisCharCode) * &H100 + CInt(nextCharCode))
            i = i + 1
        end If
    next
    bytes2BSTR = strReturn

end function

function getText(oReq,url)

    on error resume next
    '//創(chuàng)建XMLHTTP對(duì)象    
    if oReq is nothing then
        set oReq    = CreateObject("MSXML2.XMLHTTP")
    end if

    if    not oReq is nothing then
        oReq.open "get",url,false
        oReq.send 

        if oReq.status = 200 then
            getText = bytes2BSTR(oReq.responseBody)
        else
            getText = ""
        end if
    else
        getText = ""
    end if

end function

相關(guān)文章

最新評(píng)論

七台河市| 北辰区| 漳浦县| 石狮市| 湛江市| 隆昌县| 陕西省| 民乐县| 义乌市| 哈尔滨市| 洪洞县| 呼和浩特市| 南华县| 连南| 昌都县| 墨竹工卡县| 马关县| 江永县| 蒙城县| 五河县| 张家川| 长子县| 曲麻莱县| 读书| 贵港市| 永丰县| 乌拉特后旗| 肇源县| 青海省| 怀集县| 河间市| 澄城县| 凤阳县| 玛纳斯县| 全椒县| 青海省| 丹寨县| 横峰县| 乡城县| 鸡泽县| 孟津县|