You can insert and retrieve Unicode data. Data is transparently converted between character sets of the database and client programs, to ensure that client programs are independent of the database character set and the national character set.
Unicode data uses the national character set, which is specified by the NLS_NCHAR_CHARACTERSET parameter.
Representation of Unicode characters in SQL and PL statements
In SQL and PL statements, a Unicode string is represented as N'string', for example, N'EN'.
Example: Representation of Unicode characters in SQL statements
obclient> select N'EN', dump(N'EN',16), dump('EN',16) from dual;+-------+-------------------------+---------------------+
+--------+---------------------+------------------------+
| N'EN' | DUMP(N'EN',16) | DUMP('EN',16) |+-------+-------------------------+---------------------+
+--------+---------------------+------------------------+
| EN | Typ=44 Len=4: 0,45,0,4e | Typ=23 Len=2: 45,4e |+-------+-------------------------+---------------------+
+--------+---------------------+------------------------+
1 row in set (0.01 sec)
obclient> show variables where variable_name in ('nls_characterset','nls_nchar_characterset');
+------------------------+-----------+
| VARIABLE_NAME | VALUE |
+------------------------+-----------+
| nls_characterset | AL32UTF8 |
| nls_nchar_characterset | AL16UTF16 |
+------------------------+-----------+
2 rows in set (0.00 sec)
Prevention of data loss during character set conversion
Text (with or without the prefix "N") in an SQL or PL statement is encoded by using the same character set as other parts of the statement. Statements in a client are encoded based on the client character set, which is specified by the NLS_LANG parameter. Statements in a database are encoded based on the database character set.
When an SQL or PL statement is sent from a client to a database, the statement is converted from the client character set to the database character set. If the database character set does not contain all the text characters in the statement from the client, statement data loss occurs during the conversion. For example, text of the NCHAR type is more fragile than text of the CHAR type, because the NCHAR type is designed independent of the database character set.