When Oracle SQL*Plus inserts text into tables, it does not simply insert it
as it is. It compares 2 parameters: the server side NLS_CHARACTERSET and
the client side NLS_LANG, if they don't match, Oracle tries to translate it
before insertion (or retrieval). The server side NLS_CHARACTERSET has to be
a superset of the client side NLS_LANG or the translation will fail.
The server side NLS_CHARACTERSET is in table NLS_DATABASE_PARAMETERS, which
is created during database creation. The client side NLS_LANG parameter
(either as environmental variable in unix, or in registry for Windows) can
be set at session level. For example, our database is UTF-8 and our clients
can have NLS_LANG set as JA16EUC, JA16SJIS or WE8ISO8859P1. SQL*Plus
properly translates between JA16EUC/JA16SJIS/WE8ISO8859P1 and UTF8.
So please make sure that
1. Your database is UTF-8. (select value from nls_database_parameters where
parameter = 'NLS_CHARACTERSET';) If not, you can not insert unicode into
2. Set your client NLS_LANG to match the text that you want to insert.
Note: It does not have to be UTF-8, SQL*Plus will translate it for you.
Hope this helps.
<sreedhar@cmcltd To: <email@example.com>
.com> cc: <Malini.Amruthavakkula@corporate.ge.com>
Sent by: Subject: How Can I insert Unicode Characters thru SQL*Plus
I'm working on Internationalization.
My System Configuration:
Operating System : Windows2000 Professional
Database: Oracle 9i
Font : Arial Unicode MS ( suitable font for my language for display)
I tried so much to directly insert Unicode Characters(Telugu [INDIA]
Language Characters copied from UNIEDIT Software to the SQL* Plus editor)
into Oracle 9i database through SQL*Plus editor. But all the time I was
not succeeded.Please tell me what is the process to insert directly these
Unicode characters(Additional Configuraions to do?????)
I just created a tablespace with the following commands through my
1.create tablespace MyTablespace datafile 'e:\Datafiles\MyDatafile.dbf'
size 10m autoextend on maxsize unlimited;
2.create user foo identified by foo default tablespace MyTablespace;
3.grant resource,connect to foo;
Then I created a table with the follwing command
1) create table MyTable(str nchar(200));
2) insert intoMyTable values('???'); // This is my own language
But the result is "ORA-12704: character set mismatch"
Please tell me how to proceed for insertion
"This is veryUrgent for my project"
Thanks in Advance and Thanks a Lot for reading this huge mail
with so much patience.
This archive was generated by hypermail 2.1.2 : Fri Jun 07 2002 - 14:53:20 EDT