| Author |
Read Unicode chars and insert into Oracle DB
|
Mahesh Pinnamaneni
Ranch Hand
Joined: Jul 02, 2004
Posts: 100
|
|
Guys, I am having a file in which some of the text was in Unicode format. I want to read this file in Java and insert into oracle database. The following is the code for reading the unicode string from the file. Java is reading the correct unicode (i can see this while debuggin the code). Is there any way to insert the Unicode chars to DB. I am viewing the chars in the html page with Encoding set to 'Central European - Windows). Please help.. Thanks & Regards, Mahesh P
|
 |
Yuriy Zilbergleyt
Ranch Hand
Joined: Dec 13, 2004
Posts: 429
|
|
Have you tried simply storing the string as VARCHAR2? If that doesn't work, you can always serialize them to BLOB. Yuriy
|
 |
Mahesh Pinnamaneni
Ranch Hand
Joined: Jul 02, 2004
Posts: 100
|
|
Thanks for ur reply... The database column used is NVarchar to store Unicode format.. Regards, Mahesh P
|
 |
Paul Sturrock
Bartender
Joined: Apr 14, 2004
Posts: 10336
|
|
Originally posted by Mahesh Pinnamaneni: Thanks for ur reply... The database column used is NVarchar to store Unicode format.. Regards, Mahesh P
...unless that database itself is configured to support Unicode, in which case you can store unicode data in chars, varchars, clobs and longs.
|
JavaRanch FAQ HowToAskQuestionsOnJavaRanch
|
 |
 |
|
|
subject: Read Unicode chars and insert into Oracle DB
|
|
|