コードコピーは次のとおりです。
'//中国人をユニコードに変換します
functionLencoding(vstrin)
ディミ
dimstrreturn、thischr、innercode、hight8、low8
strreturn = ""
fori = 1tolen(vstrin)
thischr = mid(vstrin、i、1)
IFABS(ASC(thisChr))<&hffthen
strreturn = strreturn&thischr
それ以外
innercode = asc(thischr)
ifinnercode <0then
innercode = innercode+&h10000
endif
hight8 =(innercodeand&hff00)/&hff
low8 = innercodeand&hff
strreturn = strreturn& "%"&hex(hight8)& "%"&hex(low8)
endif
次
urlencoding = streturn
エンド機能
'// Unicodeを通常のテキストに変換します
functionbytes2bstr(vin)
ディミ
Dimstreturn、このCharcode、Next Charcode
strreturn = ""
fori = 1tolenb(vin)
thischarcode = ascb(midb(vin、i、1))
ifthischarcode <&h80then
strreturn = strreturn&chr(thischarcode)
それ以外
NextCharcode = ascb(midb(vin、i+1,1))
strreturn = strreturn&chr(clng(thischarcode)*&h100+cint(nextcharcode)))
i = i+1
endif
次