doc-exports/docs/dli/sqlreference/dli_spark_url_decode.html
Su, Xiaomeng 76a5b1ee83 dli_sqlreference_20240227
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com>
Co-authored-by: Su, Xiaomeng <suxiaomeng1@huawei.com>
Co-committed-by: Su, Xiaomeng <suxiaomeng1@huawei.com>
2024-03-27 22:02:33 +00:00

5.0 KiB

url_decode

This function is used to convert a string from the application/x-www-form-urlencoded MIME format to regular characters.

Syntax

url_decode(string <input>[, string <encoding>])

Parameters

Table 1 Parameters

Parameter

Mandatory

Type

Description

input

Yes

STRING

String to be entered

endcoding

No

STRING

Encoding format. Standard encoding formats such as GBK and UTF-8 are supported. If this parameter is not specified, UTF-8 is used by default.

Return Values

The return value is of the STRING type.

UTF-8-encoded string of the STRING type

Example Code

The value Example for URL_DECODE:// dsf (fasfs) is returned.

select url_decode('Example+for+url_decode+%3A%2F%2F+dsf%28fasfs%29', 'GBK');