• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

unicode tables on DB2 on z/OS

 
Jochen Gugel
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
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
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
<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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic