Updated on 2026-11-06 GMT+08:00

url_encode1

The url_encode1 function encodes a string to application/x-www-form-urlencoded MIME format.

Syntax

url_encode1(string [, string ])

Parameters

Parameter

Mandatory

Type

Description

input

Yes

STRING

The input string.

encoding

No

STRING

Specifies the encoding format. Supports standard encoding formats such as GBK or UTF-8. If not specified, the default is UTF-8.

Return Values

Returns a value of type STRING.

If input or encoding is NULL, NULL is returned.

Example Code

Returns Example+for+url_encode+%3A%2F%2F+dsf%28fasfs%29.

select url_encode1('Example for url_encode:// dsf(fasfs)', 'GBK');