• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Read Unicode chars and insert into Oracle DB

 
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 429
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 100
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for ur reply...

The database column used is NVarchar to store Unicode format..

Regards,
Mahesh P
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
reply
    Bookmark Topic Watch Topic
  • New Topic