Salinan kode adalah sebagai berikut:
'// Konversi bahasa Mandarin ke unicode
functionUrlencoding (vStrin)
dimi
Dimstrreturn, Thischr, Innercode, Hight8, Low8
strreturn = ""
fori = 1tolen (vStrin)
Thischr = mid (vstrin, i, 1)
Ifabs (ASC (Thischr)) <& hffthen
Strreturn = Strreturn & Thischr
kalau tidak
InnerCode = ASC (Thischr)
Ifinnercode <0then
InnerCode = InnerCode+& H10000
endif
Hight8 = (innercodeand & hff00)/& hff
Low8 = InnerCodeAnd & HFF
Strreturn = Strreturn & "%" & hex (hight8) & "%" & hex (low8)
endif
Berikutnya
Urlencoding = strreturn
fungsi endfungsi
'// Konversi Unicode ke Teks Normal
FunctionBytes2BTR (VIN)
dimi
DiMstrreturn, kode ini, nextCharcode
strreturn = ""
fori = 1TolenB (VIN)
Kode ini = ASCB (midb (vin, i, 1))
Ifthischarcode <& H80then
Strreturn = Strreturn & CHR (Kode ini)
kalau tidak
nextCharCode = ASCB (midb (vin, i+1,1)))
Strreturn = Strreturn & Chr (Clng (ThisCharcode)*& H100+CINT (NextCharCode))
i = i+1
endif
Berikutnya