Search code examples
urldecodelogparser

LogParser URLUNESCAPE '+'


Is there any way to get LogParser (2.2) URLUNESCAPE function to decode a '+' as a ' '(space)?

logparser "select URLUNESCAPE('test+value') into stdout from system"

produces the following output

'test+value'
------------
test+value
test+value
test+value
test+value
test+value
test+value
test+value
test+value
test+value
test+value
Press a key...

Solution

  • Unfortunately no, as the + <-> <space> replacement is technically not URL escaping (while %20 <-> <space> is). For this task you might want to consider using REPLACE_CHR as:

    REPLACE_CHR('test+value', '+', ' ')