Because my operating system is in English, Chinese characters cannot be correctly displayed in some places when I start my project. At that time, it was suspected that it was a problem with the operating system, but later I found that all Chinese characters read from the database are garbled and the data not read from the database can be properly displayed. I used the Oracle9i database, so I locked the suspect to the character set of Oracle. After checking the Internet for a long time, I tried a lot of methods before the modification was successful. Now I want to write down the modification method for your reference: (it is best to back up the database first to avoid unexpected events)
First, open the SQL Plus of Oracle9i;
Follow these steps:
SQL> conn/as sysdba (First, ensure that the system has adopted the OS authentication method, otherwise the connection will fail)
SQL> shutdown immediate Disable the database before you can perform the following operations
SQL> conn/as sysdba Connect with super Permissions
SQL> Startup mount;
SQL> Alter system enable restricted session;
SQL> Alter system set job_queue_processes = 0;
SQL> Alter system set AQ_TM_PROCESSES = 0;
SQL> Alter database open;
SQL> Alter database character set ZHS16CGB231280;
SQL> Shutdown immediate; Close database after modification
SQL> Startup; Enable it normally
The modification is as follows:
Now I open any table in the database and find that garbled characters have finally become Chinese, but all Chinese characters have become a word-"depend", which may be caused by modifying characters. So now we have to re-create the database, and then we can display Chinese characters normally. This method is successfully tested on my machine. If you have any shortcomings, please forgive me.
In fact, when Oracle9i was installed, there was a character set option, but it was installed by default, resulting in many detours. In the future, you can select the appropriate character set when installing Oracle. This depends on your actual situation. If it is a Chinese operating system and the Chinese version of Oracle is installed, the default is OK. Other situations are similar.