-->
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: unicode tables on DB2 on z/OS
PostPosted: Tue Feb 24, 2009 8:46 am 
Newbie

Joined: Mon Feb 23, 2009 7:52 am
Posts: 2
Hi guys,

We are developing an java web application and use DB2 as database.
For o/r mapping we use hibernate in version 3.2.6 ga
Furthermore the mapping is specified using hibernate annotations in version 3.3.1 GA.
The tables are created correctly, but only with the encoding schema A, that´s used for ascii and is the default encoding of the whole database.
Unfortunately for some other reasons (other non unicode aware systems) the default encoding could not be changed to 'U' that determines unicode.

So we have to specify the wanted encoding separately.

Hibernate creates following sql statement for creating the tables
Code:
create table PERSON_processes (PERSON_OBJ_ID bigint not null, PROCESSES varchar(255))


We tried to change the statement manually and creating tables with unicode encoding for testing purposes.
We achieved that with adding CCSID UNICODE at the end of the generated statement

so whole new statement will then lok like
Code:
create table PERSON_processes (PERSON_OBJ_ID bigint not null, PROCESSES varchar(255)) CCSID UNICODE


this work around works quite fine, but needs some manual changes, so we are looking for automatic solution using hibernate e.g. an property used in hibernate.cfg.xml

I already added following properties, but without success
Code:
<property name="hibernate.connection.useUnicode">true</property>
<property name="hibernate.connection.characterEncoding">UTF-8</property>


We also searched the web and the forum for some information, but there was nothing to solved this issue.

Any help appreciated

Kind regards
Jochen


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.