• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hibernate and Unicode

 
Maneesh Chauahn
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
In my application i want to insert the chinese characters in the Mysql 5.0 by using the hibernate. To achieve this

1. I set MYSQL 5.0 Database with character set utf 8
2. In the hibernate config file
connection.url = jdbc:mysql://localhost/multibyte?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8

Please let me know did i need to make other changes so i am able to insert chinese characters in Mysql by hibernate

Thanks
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In Java all Strings are Unicode. Hibernate is a Java applciation, so it supports Unicode by default. The only thing you have to worry about is MySQL. If you have followed their documentation to enable the database for Unicode it should just work.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic