As the title says, I'm using Hibernate ORM and whenever I try to save something with Č or Ć in it hibernate throws "couldn't execute query" error. I am using utf8, and Š, Ž, Đ characters work just fine. I'm lost...here is the cfg file:
<property name="connection.url">jdbc:mysql://localhost:3306/eventi_orm</property>
<property name="connection.username">root</property>
<property name="connection.password"></property>
<property name="connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="dialect">org.hibernate.dialect.MySQLDialect</property>
<property name="hibernate.connection.CharSet">utf8</property>
<property name="hibernate.connection.characterEncoding">utf8</property>
<property name="hibernate.connection.useUnicode">true</property>
<property name="show_sql">true</property>
<property name="format_sql">false</property>
And here is the output:
Exception in thread "AWT-EventQueue-0" org.hibernate.exception.DataException: could not execute statement
...
Caused by: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Incorrect string value: '\xC4\x87' for column 'name' at row 1