[thelist] My Pain - Your Gain.....
Anthony Baratta
Anthony at Baratta.com
Fri Apr 7 02:52:12 2000
First my obligatory rant.....
AAAAAAAAAARRRRRRRRRRRRRGGGGGGGGGGGHHHHHHHHHHHH!!!!
How in the h%ll can anyone write a stupid computer language and NOT have a decode
function to go along with an encode function??????????????????
VBScripting has the two following built in functions: HTMLEncode and URLEncode. But
there is no decode function to reverse the process. Dear gwad how long has this
language been out???? GIVE ME A BREAK!!
Its not like crypt() where we don't want to reverse it, ever. Just who in the h%ll is
in charge in Redmond out there that this is unsupported. I'm sorry, this just
convinces me VB and its bastard off-spring should be purged from the earth.
I should bill Microsoft for time lost because of endevors like this.
<TIP TYPE=ASP/VB Scripting AUTHOR=TonyB>
Here's a function that will decode URLEncoding. (If you are looking for an HTML
Decoding function - you are on your own.)
Function URLDecode(url)
temp = Replace(url,"+"," ",1,-1,1)
x = InStr(temp,"%")
Do While x > 0
URLDecode = URLDecode & Left(temp,x-1)
URLDecode = URLDecode & Chr(CLng("&H" & Mid(temp,x+1,2)))
temp = Mid(temp,x+3)
x = InStr(temp,"%")
Loop
URLDecode = URLDecode + temp
End Function
Note: This is modified version of code I stole from some ASP help site. My version of
ASP uses '+' for spaces versus %20. Hence the first Replace line. You should not have
to change this if your URLEncoding uses %20.
</TIP>
--
Anthony Baratta
President
KeyBoard Jockeys
South Park Speaks Version 3 is here!!!
http://www.baratta.com/southpark
Powered by Tsunami