Front-end UI process (written in vc6) to UTF-8 Chinese to back-end serviceProgram(Linux GCC). The data is written to the Oracle database in the background, and then the data is retrieved and displayed in the background. No encoding/decoding conversion is performed in the background, the foreground converts between VC's default GBK and UTF-8.
At the beginning, the system encountered garbled characters, and then solved the problem by setting an environment variable in Linux and restarting the background process (the problem was that the environment variable was tried to be changed, but the garbled characters still existed, and I was not sure about the original configuration at that time ).
Method:
Use SQL * Plus to query the character set of ORACLE Server:
Select userenv ('language') from dual;
Displayed as "simplified chinese_china.zhs16cgb231280 ";
View the character set of the Oracle client:
Echo $ nls_lang
If it is blank, execute export nls_lang = 'simplified chinese_china.zhs16cgb231280 ', restart the process, and solve the problem after testing.
If the character set settings of Oracle client and ORACLE Server are the same, Oracle does not perform Character Set conversion.