-->
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.  [ 2 posts ] 
Author Message
 Post subject: 1250 charset query problem in Firebird
PostPosted: Tue Mar 23, 2010 3:57 am 
Newbie

Joined: Tue Mar 16, 2010 9:58 am
Posts: 2
Hi,

I am trying to wite a database bridge between old and new Firebird database using Java SE and Hibernate. Old database is to obsolete but still is used by old application (there is noway to replace it and noway to use utf-8 in old one).

In old database are a lot of characters from charset 1250 and when I try make a select then the results of the query are empty. Simply: hibernate is unable to compare criteria from query and in the database.

Is there any solution how to set charset 1250 for this query?

Code:
  private static String QUERY_BATCH_IS_PENDLING = "from Dlmuster dl where dl.info like 'PŘÍPRAVA'"; 

  Session session = HibernateUtil.getSessionFactory().openSession();
  session.beginTransaction();

  Query q = session.createQuery(QUERY_BATCH_IS_PENDLING);


Thank you for your advices.


Top
 Profile  
 
 Post subject: Re: 1250 charset query problem in Firebird
PostPosted: Wed Mar 24, 2010 5:07 am 
Newbie

Joined: Tue Mar 16, 2010 9:58 am
Posts: 2
I solved it!

Everybody advised me to use
Code:
<property name="hibernate.connection.characterEncoding">Cp1250</property>

in hibernate.cfg.xml but it didn't work

it works with
Code:
<property name="hibernate.connection.charSet">Cp1250</property>


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

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.