코드 사본은 다음과 같습니다.
'// 중국어를 유니 코드로 변환합니다
FunctionUrlencoding (vstrin)
디미
Dimstrreturn, Thischr, InnerCode, Hight8, Low8
strreturn = ""
fori = 1tolen (vstrin)
theychr = mid (vstrin, i, 1)
ifabs (asc (thischr)) <& hffthen
strreturn = strreturn & thischr
또 다른
InnerCode = ASC (thischr)
ifinnerCode <0then
InnerCode = InnerCode+& H10000
endif
Hight8 = (내부 및 HFF00)/& HFF
LOW8 = 내부 코드 및 HFF
strreturn = strreturn & "%"& hex (hight8) & "%"& hex (low8)
endif
다음
urlencoding = strreturn
최종 기능 장애
'// 유니 코드를 일반 텍스트로 변환합니다
functionbytes2bstr (vin)
디미
Dimstrreturn,이 차체 코드, NextCharCode
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
다음