Server:
Database Character Set: ZHS16GBK
Database country character set: AL16UTF16
Client:
NLS_LANG: AL32UTF8
Environment variable:ORA_NCHAR_LITERAL_REPLACE =TRUE
This character set changes the client NLS_LANG and environment variables. If no default settings are changed, for example, the client NLS_LANG is still ZHS16GBK, and no environment variable settings are required, can the multi-country text be properly stored? If you use VB. net for development, try the following code:
..................
Dim conn As New System. Data. OracleClient. OracleConnection ("database conn string ")
Dim cmd As New System. Data. OracleClient. OracleCommand ("insert Into mer_categ (S_merc_name) Values (: S_merc_name)", conn)
Cmd. Parameters. Add ("S_merc_name", OracleClient. OracleType.NVarChar). Value = "zookeeper" conn. Open ()
Cmd. ExecuteNonQuery ()
Conn. Close ()
...............
The running results must satisfy you. Why can we directly and correctly write data to the database by setting the command parameter? The background processing mechanism remains unknown, however, I guess that the character is directly transmitted to the Oracle Server using the Unicode code of the national character set of the database, without any conversion of the character set.