نسخة الكود كما يلي:
'// تحويل الصينية إلى Unicode
POSTRICITURLENCODING (VSTRIN)
ديمي
Dimstreturn ، thischr ، innercode ، hight8 ، low8
streturn = ""
fori = 1tolen (vstrin)
thischr = منتصف (vstrin ، i ، 1)
IFABS (ASC (thischr)) <& hffthen
streturn = streturn & thischr
آخر
innercode = ASC (thischr)
ifinnercode <0then
innercode = innercode+& H10000
Endif
Hight8 = (InnerCodeand & HFF00)/& HFF
low8 = InnerCodeand & HFF
Streturn = Streturn & "٪" & Hex (Hight8) و "٪" & Hex (Low8)
Endif
التالي
urlencoding = streturn
الوظيفية
'// تحويل Unicode إلى النص العادي
functionBytes2bst (VIN)
ديمي
DimStreturn ، thischarcode ، nextCharcode
streturn = ""
fori = 1tolenb (vin)
thischarcode = ASCB (MIDB (VIN ، I ، 1))
IfThischarcode <& h80then
Streturn = Streturn & CHR (thischarcode)
آخر
NextCharCode = ASCB (MIDB (VIN ، I+1،1))
Streturn = Streturn & CHR (CLNG (thischarcode)*& H100+Cint (NextCharCode))
i = i+1
Endif
التالي