Purpose
The NLS_CHARSET_DECLTER function converts all single-byte characters to the corresponding multibyte characters. This function is valid only when the database character set contains both single-byte and multibyte characters.
Syntax
TO_MULTI_BYTE(char)
Parameters
The char parameter can be a value of the CHAR, VARCHAR2, NCHAR, or NVARCHAR2 data types. If any single-byte characters in the char parameter do not have multi-byte equivalents, they are displayed as single-byte characters in the output string.
Return type
The return value is of the same data type as char.
Examples
Converts from the one-byte
Bto the multi-byteBin UTF-8.obclient> SELECT dump(TO_MULTI_BYTE( 'B')) FROM DUAL; +---------------------------+ | DUMP(TO_MULTI_BYTE('B')) | +---------------------------+ | Typ=22 Len=3: 239,188,162 | +---------------------------+ 1 row in set
Converts the single-byte character to a double-byte character.
obclient> SELECT TO_MULTI_BYTE('China A') text FROM DUAL; +-----------+ | TEXT | +-----------+ | China A | +-----------+ 1 row in set