Convert single-byte 'G' to its multibyte representation : TO_MULTI_BYTE « Conversion Functions « Oracle PL/SQL Tutorial






SQL> DECLARE
  2     g_one_byte NVARCHAR2 (1 CHAR) := 'G';
  3     g_three_bytes NVARCHAR2 (1 CHAR);
  4     g_one_again NVARCHAR2(1 CHAR);
  5     dump_output VARCHAR2(30);
  6  BEGIN
  7
  8     g_three_bytes := TO_MULTI_BYTE(g_one_byte);
  9     DBMS_OUTPUT.PUT_LINE(LENGTHB(g_one_byte));
 10     DBMS_OUTPUT.PUT_LINE(LENGTHB(g_three_bytes));
 11     SELECT DUMP(g_three_bytes) INTO dump_output FROM dual;
 12     DBMS_OUTPUT.PUT_LINE(dump_output);
 13
 14  END;
 15  /

PL/SQL procedure successfully completed.

SQL>








15.13.TO_MULTI_BYTE
15.13.1.Convert single-byte 'G' to its multibyte representation