Die Codekopie lautet wie folgt:
'// Chinesisch in Unicode konvertieren
FunktionRencoding (Vstrin)
Dimi
Dimstrreturn, Thischr, Innercode, Hight8, Low8
Streturn = ""
fei = 1tolen (vstrin)
Thischr = Mid (Vstrin, I, 1)
Ifabs (asc (ththr)) <& hffthen
Streturn = Streturn & Thischr
anders
InnerCode = ASC (tintchr)
IfInnerCode <0Then
InnerCode = Innercode+& H10000
Endif
Hight8 = (InnerCodeand & HFF00)/& HFF
Low8 = InnerCodeand & HFF
Streturn = Streturn & "%" & Hex (Hight8) & "%" & Hex (Low8)
Endif
nächste
Urlencoding = Streturn
Endfunktion
'// Unicode in normalen Text umwandeln
functionBytes2bstr (vin)
Dimi
DIMstrreturn, thischarCode, NextCharCode
Streturn = ""
fei = 1tolenb (vin)
Thischarcode = ascb (Midb (vin, i, 1))
IFTHISCHARCODE <& H80Then
Streturn = Streturn & chrt (thisharcode)
anders
NextCharcode = ASCB (Midb (Vin, I+1,1))
Streturn = Streturn & chrt (clng (thischarcode)*& h100+cint (NextCharCode))
i = i+1
Endif
nächste