-->
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: Charset from Mysql - dotproject
PostPosted: Wed Aug 18, 2010 8:45 am 
Newbie

Joined: Wed Aug 18, 2010 8:24 am
Posts: 1
I've an aplication swing that a query to database mysql and the query return me many errors of charset...

The database and the tables have the type latin1, but alred change to utf8, latin1, unicode, etc...
In my aplication, I use hibernate and change to utf8, unicode iso-8859-1, etc, etc... too

In the properties from hibernate alread tryed:

<property name="hibernate.connection.useUnicode" value="true"/>
<property name="hibernate.connection.charSet" value="iso-8859-1"/>
------------------
<property name="hibernate.connection.url" value="jdbc:mysql://10.0.50.227:3306/banco?useOldUTF8Behavior=true"/>
------------------
<property name="hibernate.connection.url" value="jdbc:mysql://10.0.50.227:3306/banco?characterEncoding=cp850"/>
------------------
<property name="hibernate.connection.url" value="jdbc:mysql://10.0.50.227:3306/banco?characterEncoding=utf8"/>
------------------
<property name="hibernate.connection.url" value="jdbc:mysql://10.0.50.227:3306/banco?characterEncoding=iso-8859-1/>
------------------
byte[] btstr = taskFound.getTaskName().getBytes();
String msg = new String(btstr,"latin1");//"ISO-8859-1");
System.out.println(msg);

------------------

This is the result:

ProduÃ?Æ?Ã?§Ã?Æ?Ã?£o = (Produção)

I'm importing table from dotproject for a plugin mine...

Somebody have idea that how to solution this problem?


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.