Hi
I would like to insert UTF-8 character set data in Oracle 9i but Oracle is not taking data as it should appear in UTF-8. What should be done here?
Do I need to change the settings in Oracle?
-
Inserting UTF-8 into Oracle (3 messages)
- Posted by: Puneet Gupta
- Posted on: March 23 2006 05:26 EST
Threaded Messages (3)
- Inserting UTF-8 into Oracle by Bhushan Bhangale on March 23 2006 06:48 EST
- Re : Inserting UTF-8 Data into Oracle by Abhishek Kalyan on March 23 2006 09:38 EST
- Technical Article describing some of the challenges and solution by null on March 29 2006 13:01 EST
-
Inserting UTF-8 into Oracle[ Go to top ]
- Posted by: Bhushan Bhangale
- Posted on: March 23 2006 06:48 EST
- in response to Puneet Gupta
Couple of things you need to make sure -
1. Make sure your oracle database is configured for UTF-8 charset.
2. Make sure you are entering correct data in UTF-8 format.
3. Take out the data and check if its returning what you entered. This is because I am not sure if command line sql or some client will show the data in utf-8 format correctly. -
Re : Inserting UTF-8 Data into Oracle[ Go to top ]
- Posted by: Abhishek Kalyan
- Posted on: March 23 2006 09:38 EST
- in response to Bhushan Bhangale
How sure are u that the data which u r trying to insert into DB is an UTF-8 one?
Also do check if the data which u r trying to insert into the DB is in a String DataType, make sure that you have not used something like the one mentioned below :
String dataToBeInserted = new String(dataInByteArray);
where dataInByteArray is a byte array representing the data which is to be inserted. If it is so then there is a sure case where the data will be transformed into the default character set of the OS on which the application is running. so, when u handle the data in the form of Bytes make sure that u mention the encoding/characterset when u construct a String out of the data.
If possible do paste the way in which u r trying to insert the data in the Oracle DB.
--Abhishek -
Technical Article describing some of the challenges and solution[ Go to top ]
- Posted by: null
- Posted on: March 29 2006 13:01 EST
- in response to Puneet Gupta
You might find this URL beneficial:
Character Conversions from Browser to Database
http://java.sun.com/developer/technicalArticles/Intl/HTTPCharset/
Some challenges and resolutions...
Venkatt