In the process of using sqlplus, it is common to encounter the problem that a machine is garbled in Chinese when accessing the Oracle database, which is caused by inconsistency between the client character set and the server character set. In real-world use, the server character set, the client character set and the operating system character set must be consistent, or to include a relationship in order to correctly display Chinese characters, this experience describes a way to eliminate garbled characters by modifying the client character set and the operating system character set.
Press Win+r to bring up the Windows Runtime window and enter "cmd" in the window to enter the command-line program.
On the cmd command line, enter "Sqlplus username/password @ service name" to log into the database, where the user name, password, service name needs to be replaced according to the actual situation. After landing, you will find that the prompt is not noon, or contain garbled, this is the problem we need to solve. Execute select userenv (' language ') from dual in Sqlplus and view the character set of the current database as: Simplified Chinese_china. ZHS16GBK. All we need to do is set the client and operating system character sets to this.
First set the client character set, right click on My Computer, select Properties.
In the Properties dialog box that pops up, select Advanced, environment variables.
Look for an environment variable named "Nls_lang" in the environment variable, and if not, create a new one and assign the value of the variable to: "Simplified Chinese_china. ZHS16GBK "(needs to be assigned based on the actual database server character set). The client character set setting was successful.
From the Start menu, select Control Panel-Regional and Language options to set the computer language under this option.
Under Advanced options, select the language for non-Unicode programs in Chinese, and click OK. When you click OK, you will be prompted to install the character set and prompt you need to restart your computer to take effect, restart.
Restart completed, again into the sqlplus, found Chinese garbled problem solved.
Note: Add new data again to see that it is not garbled article from: http://jingyan.baidu.com/article/48b558e33242ad7f38c09af8.html
Solve the problem of Chinese garbled characters in Sqlplus foreground program