Purpose
The CONVERT function converts all single-byte characters to their corresponding multibyte characters. This function is effective only if your database character set includes both single-byte and multibyte characters.
Syntax
TO_MULTI_BYTE(char)
Parameters
char can be of data types CHAR, VARCHAR2, NCHAR, or NVARCHAR2. Single-byte characters in the char parameter that do not have a multibyte equivalent will be displayed as single-byte characters in the output string.
Return type
The return value has the same data type as char.
Examples
Convert the single-byte
Bto multibyteBin 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 halfwidth characters in the string to fullwidth characters.
obclient> SELECT TO_MULTI_BYTE('China A') text FROM DUAL; +-----------+ | TEXT | +-----------+ | China A | +-----------+ 1 row in set
