I have just studied Linux and are still studying OCI. After calling OCI to connect to the database a few days ago, I tested it using the example provided by ORACLE to read data normally (in English ).
I have just studied Linux and are still studying OCI. After calling OCI to connect to the database a few days ago, I tested it using the example provided by ORACLE to read data normally (in English ).
I have just studied Linux and are still studying OCI.
After calling OCI to connect to the database a few days ago, I tested it using the example provided by Oracle to read data normally (in English ,, switch to another development module. During the past few days, the database module needs to insert Chinese data to find that all data inserted is "???? ". Make sure that the data is in GB2312 format and remains invalid after being converted to a UTF-8. It is always ineffective after many times.
Google found an article about setting the character set NLS_LANG on the client. Remember that oracle was installed in English and only the LANG variable was set. This is not set. SELECT * FROM sys. props $ on the ORACLE server to obtain
NLS_LANGUAGE = AMERICAN
NLS_TERRITORY = AMERICA
NLS_ISO_CURRENCY = AMERICA
NLS_CHARACTERSET = ZHS16GBK
Set NLS_LANG = AMERICAN_AMERICA.ZHS16GBK based on these parameters (in the GOOGLE article, set NLS_LANG = "SIMPLIFIED CHINESE_CHINA.ZHS16GBK" because the character set of the installed server is different ).
Then, in/etc/profile, export NLS_LANG = AMERICAN_AMERICA.ZHS16GBK, then source/etc/profile, and then run the program. Haha, Chinese is coming!