Function URLEncoding(vstrIn) strReturn = "" For i = 1 To Len(vstrIn) ThisChr = Mid(vStrIn,i,1) If Abs(Asc(ThisChr)) < &HFF Then strReturn = strReturn & ThisChr Else innerCode = Asc(ThisChr) If innerCode < 0 Then innerCode = innerCode + &H10000 End If Hight8 = (innerCode And &HFF00)\ &HFF Low8 = innerCode And &HFF strReturn = strReturn & "%" & Hex(Hight8) & "%" & Hex(Low8) End If Next URLEncoding = strReturn End Function Function URLDecoding(sIn) Dim s,i,l,c,t,n : s="" : l=Len(sIn) For i=1 To l c=Mid(sIn,i,1) If c<>"%" Then s = s & c Else c=Mid(sIn,i+1,2) : i=i+2 : t=CInt("&H" & c) If t<&H80 Then s=s & Chr(t) Else c=Mid(sIn,i+1,3) If Left(c,1)<>"%" Then URLDecoding=s Exit Function Else c=Right(c,2) : n=CInt("&H" & c) t=t*256+n-65536 s = s & Chr(t) : i=i+3 End If End If End If Next URLDecoding=s End Function