forked from laiweijian4/doc-exports
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>
6.6 KiB
6.6 KiB
encode
This function is used to encode str in charset format.
Syntax
encode(string <str>, string <charset>)
Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
str |
Yes |
STRING |
At least two strings must be specified. The value is of the STRING type. If the value is of the BIGINT, DECIMAL, DOUBLE, or DATETIME type, the value is implicitly converted to the STRING type for calculation. |
charset |
Yes |
STRING |
Encoding format. The options are UTF-8, UTF-16, UTF-16LE, UTF-16BE, ISO-8859-1, and US-ASCII. |
Return Values
The return value is of the BINARY type.
Parent topic: String Functions