I am facing a bit of trouble to get utf8 data out of hibenate. I am using RDS database. I have created a table with following syntax:
CREATE TABLE `Test' (
`id` char(36) NOT NULL
)DEFAULT CHARSET=utf8;
And this is my following configuration of hibernate:
<prop key="hibernate.connection.url">${JDBC.databaseURL}</prop>
<prop key="hibernate.connection.username">${Username} </prop>
<prop key="hibernate.connection.useUnicode">true</prop>
<prop key="hibernate.connection.characterEncoding">utf8</prop>
<prop key="hibernate.connection.CharSet">utf8</prop>
I have inserted a row in db table manually in Japanese , and I could see that data is present in Japanese when I do select * from Test;
But when I query from hibernate, it is coming as garbage. I do not get back correctly. Can you please help what I am doing wrong here?