urldecode()
Decodes the given URL. For example, %20
is converted to a whitespace.
Syntax
urldecode(STR_EXPR[, CHARSET])
Required Parameter
STR_EXPR
- Source string expression. If the expression is
null
, the function returnsnull
.
Optional Parameter
CHARSET
- Character set (default: utf-8). Use the preferred MIME name or aliases registered in the following document: http://www.iana.org/assignments/character-sets/character-sets.xhtml
Usage
json "{
'url': 'ko.logpresso.com/documents/%B7%CE%B1%D7%BA%D0%BC%AE'
}"
| eval decode=urldecode(field("url"), "EUC-KR")
=> ko.logpresso.com/documents/로그분석
json "{
'url': 'ko.logpresso.com/documents/%EB%A1%9C%EA%B7%B8%EB%B6%84%EC%84%9D'
}"
| eval decode=urldecode(field("url"))
=> ko.logpresso.com/documents/로그분석
json "{}" | eval _line=urldecode(null) => null