Hello all --
Found this function. It'll do the same thing as the client side javaScript function, unescape().
enjoy.
Found this function. It'll do the same thing as the client side javaScript function, unescape().
enjoy.
Code:
function DecodeURLStr(sStr) 'Decodes an encoded QueryString (all URL Entity equivs. will be converted)
Dim aChars, aANSICodes
Dim sChars, sANSICodes
Dim sOutput
sChars = " ,',!,#,$,%,&,(,),/,:,;,[,\,],^,`,{,|,},+,<,=,>"
sANSICodes = "+,%27,%21,%23,%24,%25,%26,%28,%29,%2F,%3A,%3B,%5B,%5C,%5D,%5E,%60,%7B,%7C,%7D,%2B,%3C,%3D,%3E"
aChars = Split(sChars, ",", -1, 1)
aANSICodes = Split(sANSICodes, ",", -1, 1)
'Debug
'Response.Write ("URL Decoding Array's"
' & "<BR>")
For i = 0 To Ubound(aChars) Step 1
'Debug
'Response.Write ("Char=" & aChars(i) & " : ANSICode=" & aANSICodes(i) & "<BR>")
if (InStr(1, sStr, aANSICodes(i), vbTextCompare) <> 0) Then
sStr = (Replace(sStr, aANSICodes(i), aChars(i), 1, -1, vbTextCompare))
End if
Next
DecodeURLStr = sStr
End function