-->
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.  [ 4 posts ] 
Author Message
 Post subject: problems with german umlaut
PostPosted: Sat Mar 27, 2004 10:47 am 
Newbie

Joined: Mon Mar 01, 2004 3:29 am
Posts: 3
Hi all,

I use firebird as database and have problems when I save something with german specific letters like umlauts. The following exception occurred:

Code:
org.firebirdsql.jdbc.FBSQLException: GDS Exception. arithmetic exception, numeric overflow, or string truncation
Cannot transliterate character between character sets


I tried something to solve this problem, for example:

1. used system property -Dfile.encoding=ISO-8859-1
2. set a specific firebird property to Configuration:

Code:
Configuration cfg = new Configuration();
cfg.setProperty("lc_ctype", "ISO8859_1");


But all this doesn't helped.

The database table's itself are created with a charset of ISO-8859-1 and I have no problems to add data with german umlauts in a database tool like IBExpert.


Has anybody an idea ?

Thanks in forward
Rico


Top
 Profile  
 
 Post subject:
PostPosted: Sat Mar 27, 2004 9:08 pm 
Newbie

Joined: Mon Mar 01, 2004 3:29 am
Posts: 3
Ok OK, if nobody help me I have to help me myself. If somebody is interesting in, something helped me:

Code:
Class.forName("org.firebirdsql.jdbc.FBDriver");

Properties dbprop = new Properties();
dbprop.setProperty("user", "sysdba");
dbprop.setProperty("password", "masterkey");
dbprop.setProperty("lc_ctype", "ISO8859_1");

conn = DriverManager.getConnection("jdbc:firebirdsql:localhost/3050:C:/db.gdb", dbprop);

Configuration cfg = new Configuration();
cfg.addClass(Foo.class );
...
SessionFactory sessions = cfg.buildSessionFactory();
setSession(sessions.openSession(conn));

Bye bye
Rico


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 28, 2004 4:03 am 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
Rico,
hibernate team is working on next release, they continue helping us in the forum but have less time, just be patient...


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 28, 2004 6:28 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
hibernate.connection.lc_type = "ISO8859_1"

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.