|
i have a problem. when i save the data on hibernate, from á,ő,ú,ó,ü,ö spell will be &,ß,$ ....
why is that? how can i setup the correct charset?
the database charset is correct.
(Sorry, for bad english)
this is my cfg.xml
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-configuration
PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd">
<hibernate-configuration>
<session-factory>
<!-- local connection properties -->
<property name="hibernate.connection.url">
jdbc:mysql://localhost:3306/vendegvaro?useUnicode=true&characterEncoding=Latin2
</property>
<property name="hibernate.connection.driver_class">
com.mysql.jdbc.Driver
</property>
<property name="hibernate.connection.username">root</property>
<property name="hibernate.connection.password" />
<property name="hibernate.connection.charset">Latin2</property>
<!-- property name="hibernate.connection.pool_size"></property -->
<!-- dialect for MySQL -->
<property name="dialect">
net.sf.hibernate.dialect.MySQLDialect
</property>
<property name="hibernate.show_sql">false</property>
<property name="hibernate.use_outer_join">true</property>
<property name="transaction.factory_class">
net.sf.hibernate.transaction.JDBCTransactionFactory
</property>
<property name="hibernate.cache.provider_class">
net.sf.hibernate.cache.HashtableCacheProvider
</property>
<property name="jta.UserTransaction">
java:comp/UserTransaction
</property>
<mapping resource="hu/szecsenyi/vendegvaro/table/Appartman.hbm.xml" />
<mapping resource="hu/szecsenyi/vendegvaro/table/Foglalas.hbm.xml" />
<mapping resource="hu/szecsenyi/vendegvaro/table/QuickFog.hbm.xml" />
<mapping resource="hu/szecsenyi/vendegvaro/table/Tulajdonos.hbm.xml" />
<mapping resource="hu/szecsenyi/vendegvaro/table/Beallitas.hbm.xml" />
<mapping resource="hu/szecsenyi/vendegvaro/table/Szallashely.hbm.xml" />
<mapping resource="hu/szecsenyi/vendegvaro/table/User.hbm.xml" />
<mapping resource="hu/szecsenyi/vendegvaro/table/Vendeg.hbm.xml" />
</session-factory>
</hibernate-configuration>
|