Cannot insert non latin symbols in MySQL
- by glebreutov
I'm writing web-app using MySQL version 5.1.45, Tomcat 5.5.28 and Hibernate 3
When I'm trying to save string that contains non-latin characters (for example ??????) error occurs:
1589 [main] WARN org.hibernate.util.JDBCExceptionReporter - SQL Error: 1366, SQLState: HY000
1589 [main] ERROR org.hibernate.util.JDBCExceptionReporter - Incorrect string value: '\xD0\xA3\xD0\xBF\xD1\x8F...' for column 'name' at row 1
Hibernate connection settings
<property name="connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="connection.url">jdbc:mysql://localhost/E2012?characterEncoding=UTF8&useUnicode=true</property>
<property name="connection.username">***</property>
<property name="connection.password">***</property>
<property name="hibernate.connection.charSet">UTF8</property>
MySQL config My.cnf
[client]
default-character-set=utf8
[mysqld]
default-character-set=utf8
Even query set name utf-8 doesn't resolve problem
Thanks for help!