Wednesday, April 29, 2009

HowToOracle: Tidbits In Oracle

Before Inserting Chinese Character:-

Set the client machine locale to UTF-8.
In Unix
LANG=en_US.UTF-8;export LANG
In Windows:-
chcp 65001

Link
Changing your locale on Windows

Can not see chinese character in my TOAD/SQLPLUS/SQL NAVIGATOR etc

To see that you have to change the NLS_LANG for the oracle client machine (may be your local windows machine or the Unix client; basically where client is installed)

Where to set the NLS_LANG in Windows
[ Taken from nls_lang faq ]

In the Registry:

On Windows systems, you should make sure that you have set an NLS_LANG registry subkey for each of your Oracle Homes:

You can easily modify this subkey with the Windows Registry Editor:

Start -> Run...

Type "regedit", and click "ok"

Edit the following registry entry:

For Oracle version 7:

HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE

For Oracle Database versions 8, 8i and 9i:

HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOMEx\

where "x" is the unique number identifying the Oracle home.

HOME0 is the first installation

For Oracle Database 10g:

HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_

There you have an entry with name NLS_LANG

What to change:-
[ Taken from Toad wiki ]

Reset NLS_LANG on your Client machine to AMERICAN_AMERICA.JA16SJIS to view Japanese and AMERICAN_AMERICA.ZHT16BIG5 to view Chinese.

Labels: