After the oracle installation is successful, you can change the character set to solve the garbled problem.

Source: Internet
Author: User


I have read articles on the Internet, and there are several possible reasons for Garbled text: 1. operating System Character Set 2. character Set of oracle server 3. character Set of the Client 1. view the oracle Character Set Java code select userenv ('language') from dual 2. in Ubuntu. add the following to bashrc:
Export NLS_LANG = AMERICAN_AMERICA.ZHS16GBK (get rid of the operating system Character Set) Oracle NLS_LANG Oracle
3. Reference
If the character set of oracle is the same as that of the operating system, data is directly read from oracle during query and directly returned to the user. during insertion, data is directly inserted into the database. However, if they are inconsistent, the data in the database is converted to the operating system character set and returned to the user. The data is converted before being inserted to the database. This is what people on the Internet say, but I did not try it. I have time to give it a try to see if it is what he said. 4. Modify the Oracle encoding as in the operating system. (Refer to others) log on to dba SQL> conn sys/sys as sysdba; stop database SQL> shutdown immediate; Start database to mount status SQL> STARTUP MOUNT; java code: ORACLE instance started. total System Global Area 76619308 bytes Fixed Size 454188 bytes Variable Size 58720256 bytes Database Buffers 16777216 bytes Redo Buffers 667648 bytes Database mounted. SQL> alter session set SQL _TRACE = TRUE; Session altered. SQL> ALTER SYSTEM ENABLE RESTRICTED SESSION; System altered. SQL> ALTER SYSTEM SET JOB_QUEUE_PROCESSES = 0; System altered. SQL> ALTER SYSTEM SET AQ_TM_PROCESSES = 0; System altered. start database SQL> Alter DATABASE open; set character set SQL> ALTER database CHARACTER SET ZHS16GBK; clear Chinese garbled characters in the DATABASE first. And then execute. This may cause an error. Execute this alter database character set INTERNAL_USE ZHS16GBK to skip the character set check and close the database SQL> Shutdown immediate; restart SQL> startup; after that, try it in sqlplus, however, it is still garbled in pl/SQL. Finally, create a table in pl/SQL and insert Chinese characters. check whether it is correct. This solves the garbled problem. There are still a lot of problems in the middle. Please study them slowly. Author: piaoliuxiong

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.