Purpose
You can call this function to convert all single-byte characters into 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 types
This function returns the same value type as char.
Examples
Convert 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 setConvert a half-width character in a string into a full-width character.
obclient> SELECT TO_MULTI_BYTE('A') text FROM DUAL; +-----------+ TEXT +-----------+ A +-----------+ 1 row in set