-->
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.  [ 3 posts ] 
Author Message
 Post subject: Hibernate character encoding, postgresql
PostPosted: Tue Sep 07, 2010 8:08 am 
Newbie

Joined: Tue Sep 07, 2010 7:53 am
Posts: 2
Hi,

I have db with latin2 encoding and can't find way to get correct encoding with hibernate (i'm using seam, entitymanager)
There's no possibility to change db encoding, becouse others apps uses it.
How can i fix this ?

Code:
CREATE DATABASE testdb
       ENCODING = 'LATIN2'
       LC_COLLATE = 'C'
       LC_CTYPE = 'C';


Top
 Profile  
 
 Post subject: Re: Hibernate character encoding, postgresql
PostPosted: Wed Sep 08, 2010 12:55 pm 
Beginner
Beginner

Joined: Tue Jul 03, 2007 8:47 am
Posts: 46
I guess there is some way to pass the encoding down to the JDBC-Driver as parameter when you connect to the database. But its just a guess.


Top
 Profile  
 
 Post subject: Re: Hibernate character encoding, postgresql
PostPosted: Fri Sep 10, 2010 2:19 am 
Newbie

Joined: Tue Sep 07, 2010 7:53 am
Posts: 2
I wrote this two lines to persistence.xml
Code:
<property name="hibernate.connection.characterEncoding" value="utf8" />
<property name="hibernate.connection.charSet" value="utf8" />

and it works, first line is from some forum second from documentation
i think only second is required.

anyway no w i've got another problem. i use page params that contain non english chars
parameters are being passed to backing bean variable.
i took debugger to checkout what's going on and found out that during render phase
function setParamName is being called a least three time,
first time param is empty string, second it contains string with proper charaters
and third it contain string with some strange characters...


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