Purpose
TO_MULTI_BYTE() converts all single-byte characters into the corresponding multi-byte characters. This function is valid only when your database character set contains both single-byte and multi-byte characters.
Syntax
TO_MULTI_BYTE(char)
Parameters
char can be CHAR, VARCHAR2, NCHAR, or NVARCHAR2. If a single-byte character in char does not have a multi-byte equivalent, the single-byte character is displayed in the output character string.
Return type
The return type is the same as the data type of char.
Examples
The following example converts the single-byte character
Bto the multi-byteBin UTF8.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
The following example converts a half-width character in a string into a full-width character.
obclient> SELECT TO_MULTI_BYTE('Hello World') AS text FROM DUAL; +---------------------+ | TEXT | +---------------------+ | Hello World | +---------------------+ 1 row in set