Purpose
The CONVERT_BYTE_TO_MULTIBYTE function is used to convert all single-byte characters to their corresponding multibyte counterparts. This function is only effective when your database character set includes both single-byte and multibyte characters.
Syntax
TO_MULTI_BYTE(char)
Parameters
char can be of type CHAR, VARCHAR2, NCHAR, or NVARCHAR2. If any single-byte characters in char have no equivalent in multibyte, they will be displayed as single-byte characters in the output string.
Return type
The return value is of the same data type as the char value.
Examples
Convert from single-byte
Bto UTF8 multibyteB.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
Convert half-width characters in the string to full-width characters.
obclient> SELECT TO_MULTI_BYTE('China A') text FROM DUAL; +-----------+ | TEXT | +-----------+ | China A | +-----------+ 1 row in set