La copie de code est la suivante:
'// Convertir le chinois en Unicode
fonctionurlencoding (vstrin)
dimi
Dimstrreturn, Thischr, Innercode, Hight8, Low8
strreturn = ""
fori = 1Tolen (vstrin)
Thischr = mid (vstrin, i, 1)
Ifabs (asc (thischr)) <& hffthen
Streturn = Strreturn & Thischr
autre
innercode = ASC (ThisChr)
Ifinnercode <0
innercode = innercode + & h10000
endire
Hight8 = (innercodeand & hff00) / & hff
Low8 = Innercodeand & HFF
Streturn = Strreturn & "%" & Hex (Hight8) & "%" & Hex (Low8)
endire
suivant
Urlencoding = Streturn
finition de fin
'// Convertir Unicode en texte normal
functionBytes2BSTR (VIN)
dimi
Dimstrreturn, ThisCharcode, NextCharcode
strreturn = ""
fori = 1Tolenb (vin)
ThisCharcode = ASCB (midb (vin, i, 1))
Ifthischarcode <& h80Then
Streturn = Strreturn & Chr (ThisCharcode)
autre
NextCharcode = ASCB (Midb (Vin, I + 1,1))
Streturn = Streturn & Chr (Clng (ThisCharcode) * & H100 + Cint (NextCharcode))
i = i + 1
endire
suivant