Home » SQL & PL/SQL » SQL & PL/SQL » multilagual charactor (10g,11g)
multilagual charactor [message #636176] Sun, 19 April 2015 00:49 Go to next message
dsatya10
Messages: 8
Registered: April 2015
Location: India
Junior Member
How to insert English and Chinese in table in oracle.
Re: multilagual charactor [message #636179 is a reply to message #636176] Sun, 19 April 2015 00:54 Go to previous messageGo to next message
dsatya10
Messages: 8
Registered: April 2015
Location: India
Junior Member
After running below querry it is inserting ???? in batabse
update emp set job='怎么样' where empno=7369;
Re: multilagual charactor [message #636180 is a reply to message #636179] Sun, 19 April 2015 01:44 Go to previous messageGo to next message
Lalit Kumar B
Messages: 3174
Registered: May 2013
Location: World Wide on the Web
Senior Member
Your client is unable to display the chinese characters. To verify the table data, compare the dump of the value and the data in the table.

If your database is able to store chinese, then all you need to do is set your client's NLS_LANG to display chinese.

Another way to check is, spool the data as html and open with a browser, most of the browsers are able to display multiple charactersets. Thus, you could confirm that the data is stored properly in the database.

Check this similar question in AskTom https://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:10250420313043

[Updated on: Sun, 19 April 2015 01:47]

Report message to a moderator

Re: multilagual charactor [message #636182 is a reply to message #636176] Sun, 19 April 2015 05:43 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

You have to:
1/ Have a database with a character set that supports Chinese characters
2/ Have a client with a character set that supports Chinese characters
3/ Properly set NLS_LANG in the client
4/ Use a client program which is able to display Chinese characters


Re: multilagual charactor [message #636183 is a reply to message #636182] Sun, 19 April 2015 06:06 Go to previous messageGo to next message
dsatya10
Messages: 8
Registered: April 2015
Location: India
Junior Member
I have to store both languge english and chinese.

Below are my sessions parameters

PARAMETER VALUE
------------------------------ ----------------------------------------
NLS_LANGUAGE AMERICAN
NLS_TERRITORY AMERICA
NLS_CURRENCY $
NLS_ISO_CURRENCY AMERICA
NLS_NUMERIC_CHARACTERS .,
NLS_CALENDAR GREGORIAN
NLS_DATE_FORMAT DD-MON-RR
NLS_DATE_LANGUAGE AMERICAN
NLS_SORT BINARY
NLS_TIME_FORMAT HH.MI.SSXFF AM
NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR
NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR
NLS_DUAL_CURRENCY $
NLS_COMP BINARY
NLS_LENGTH_SEMANTICS BYTE
NLS_NCHAR_CONV_EXCP TRUE
Re: multilagual charactor [message #636184 is a reply to message #636183] Sun, 19 April 2015 06:59 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

I talked about character set, where do you see anything about character set in your post?

Re: multilagual charactor [message #636185 is a reply to message #636184] Sun, 19 April 2015 07:17 Go to previous messageGo to next message
dsatya10
Messages: 8
Registered: April 2015
Location: India
Junior Member
NLS_CHARACTERSET WE8MSWIN1252
Re: multilagual charactor [message #636186 is a reply to message #636185] Sun, 19 April 2015 07:45 Go to previous messageGo to next message
dsatya10
Messages: 8
Registered: April 2015
Location: India
Junior Member
By using sql developer I am able to insert/update data properly. But when I am using sql editor or plsql developer corrupted data (????) is inserting.
Re: multilagual charactor [message #636188 is a reply to message #636185] Sun, 19 April 2015 08:20 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

dsatya10 wrote on Sun, 19 April 2015 14:17
NLS_CHARACTERSET WE8MSWIN1252


Which does not support Chinese characters.

Also ALWAYS copy and paste the command you execute and its result.
Use SQL*PLus.

Please read How to use [code] tags and make your code easier to read.

Re: multilagual charactor [message #636189 is a reply to message #636188] Sun, 19 April 2015 08:52 Go to previous messageGo to next message
dsatya10
Messages: 8
Registered: April 2015
Location: India
Junior Member
insert into emp (empno,ename,job) values (7371,'SMITH','怎么样');

Above statement working properly in sql developer by changing settings tools>environment>encoding to utf8.

But in sql editor and plsql developer it is creating problem. Anybody having idea about these setting in these editors.
Re: multilagual charactor [message #636192 is a reply to message #636189] Sun, 19 April 2015 11:20 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

If your database has a character set that does not support Chinese characters, ANYTHING you can do is WRONG.
Sometimes it might seem to "work" but it does not.
Sometimes when you jump from the 10th floor you still live; does this mean you can still do it?

Re: multilagual charactor [message #636193 is a reply to message #636192] Sun, 19 April 2015 12:07 Go to previous messageGo to next message
dsatya10
Messages: 8
Registered: April 2015
Location: India
Junior Member
Thanks for reply michel.
Could you plese sugest how to perform this insert statement. This contains both english and chinese word.
Re: multilagual charactor [message #636194 is a reply to message #636193] Sun, 19 April 2015 12:13 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

You have to FIRST recreate your database with a correct character set.

Re: multilagual charactor [message #636197 is a reply to message #636194] Sun, 19 April 2015 12:52 Go to previous messageGo to next message
dsatya10
Messages: 8
Registered: April 2015
Location: India
Junior Member
Which character support both english and chinese.
Re: multilagual charactor [message #636198 is a reply to message #636197] Sun, 19 April 2015 12:56 Go to previous message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Several, pick the one you want:
Database Globalization Support Guide
Chapter 2 Choosing a Character Set

Previous Topic: SQL query help
Next Topic: how to decide when to go for local vs global partitioned index on a table
Goto Forum:
  


Current Time: Fri Mar 29 03:41:10 CDT 2024