Upon a browser submit of data, it will often be "escaped" by the browser, where
unusual characters are converted to their ascii code in Hex and then preceded
by a percent sign. Domino usually takes care of this for you but if you start
playing with Query_Strings in Lotus Script you have to do it by hand. This
function does the following...

a) Search for a percent sign.
b) If there is one then chop the string into three parts
i) The bit upto (not including) the % sign
ii) The 2 digit hex number following the % sign
iii) The unprocessed part of the string after the hex #
c) i) and the chr() of ii) are concatenated and then added to a recursed
treatment of the remainder iii)
d) Return the string.
Function Unescape(Byval strIn) As String
On Error Resume Next
Dim intPercent As Integer
intPercent = Instr(strIn, "%")
If intPercent Then
strIn = Mid(strIn, 1, intPercent - 1) & Chr(Cint("&H" & Mid(strIn, intPercent
+ 1, 2))) & Unescape(Mid(strIn,intPercent + 3))
End If
Unescape = strIn
End Function

Dig Deeper on Domino Resources

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.




  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...