-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Hibernate Oracle & UNICODE/UTF8
PostPosted: Wed Jun 29, 2005 12:37 pm 
Newbie

Joined: Wed Jun 29, 2005 12:10 pm
Posts: 1
Hibernate version: 3.0

Name and version of the database you are using: Oracle 9i & 10g via the Oracle Thin JDBC Driver

Problem description: I'm having problems inserting UTF8 characters into nvarchar2 fields in an Oracle database. The character I'm using to test is the euro character. It is represented in UTF8 as 3 bytes: 0xE2 0x82 0xAC. After the insert statement executes I look in the database and see the following 6 bytes stored in the column: 0xC3 0xA2 0xC2 0xBF 0xC2 0xAC.

I've captured the query being generated by hibernate and indeed the appropriate three bytes are being inserted into the prepared statement. However, when I capture the insesrt statement being submitted to Oracle by the JDBC thin driver those 3 bytes have been converted to the bogus 6 bytes

I have attempted the following to fix:
- upgrade to the 10.1.0.4.0 JDBC driver from Oracle
- set both the national characterset and the normal characterset of the database to UTF8 (as suggested in one of the last posts in topic http://forum.hibernate.org/viewtopic.php?t=925490)

Is there any know fix for this behavior?

Cheers,
Bill


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.