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?
|