[รหัส] <Script>
FunctionChinesefromutf8url (strutf8)
-
varbstr = "";
varnoffset = 0;
// ProcessingPointSonstRutf8
if (strutf8 == "")
กลับ"";
strutf8 = strutf8.toLowercase ();
noffset = strutf8.indexof ("%e");
ถ้า (noffset ==-1)
returnstrutf8;
ในขณะที่ (noffset! =-1)
-
bstr+= strutf8.substr (0, noffset);
strutf8 = strutf8.substr (noffset, strutf8.length-noffset);
if (strUtf8 == "" ¦ (strutf8.length <9) // badstring
returnBSTR;
BSTR+= UTF8CODETOCHINESECHAR (strutf8.substr (0,9));
strutf8 = strutf8.substr (9, strutf8.length-9);
noffset = strutf8.indexof ("%e");