Hi Folks,
Not sure if anybody can help me - I am sure this should work - but I am at a
bit of a loss...
The code below shows that ASP interprets a '%00' in the querystring as EOF.
Does anybody know how to possibly treat this string as binary and get the
whole thing?
It is kinda useless being able to get the UDH / Binary message text via a
querystring if every %00 is going to truncate it :)
Regards,
Troy
<%
Response.Buffer = False
Response.Write "<PRE>" & vbCrLf
Response.Write "H:" & URLEncode(Request.Querystring("h")) & vbCrLf
Response.Write "LEN:" & LEN(Request.Querystring("h")) & vbCrLf
Response.Write "</PRE>" & vbCrLf
Private Function URLEncode(URL)
Dim strChar, intPos, strUrl, intASC, strHEX
For intPos = 1 To Len(URL)
intASC = Asc(Mid(URL, intPos, 1))
If (intASC >= 65 AND intASC <= 90) or (intASC >= 97 AND intASC <=
122) OR (intASC >= 48 AND intASC <= 57) Then
strUrl = strUrl & Chr(intASC)
ELSE
strHEX = Trim(Hex(intASC))
If Len(strHEX) = 1 Then strHEX = "0" & strHEX
strUrl = strUrl & "%" & strHEX
End If
Next
URLEncode = REPLACE(strUrl,"%20", " ")
End Function
%>