The STRING_TO_RAW function converts a VARCHAR or NVARCHAR string to another valid character set and returns the result as raw data.
Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition does not support this feature.
Syntax
UTL_I18N.STRING_TO_RAW (
data IN VARCHAR,
dst_charset IN VARCHAR := NULL)
RETURN RAW AS ret RAW(32767);
Parameters
| Parameter | Description |
|---|---|
| data | The VARCHAR or NVARCHAR string to be converted. |
| dst_charset | The target character set. If dst_charset is NULL, the database character set is used for character data, and the national character set is used for NCHAR data. |
Considerations
If an invalid character set, NULL, or a string of length 0 is specified, the function returns a NULL string.
