I'm running a webapp from amazon rds with tomcat 7 and spring, which uses hibernate as the persistence layer. The application and utf-8 encoding work properly on localhost, but for some reason when I deploy to amazon, the UTF-8 encoding breaks.

I use mysql 5.5.27 on amazon rds and the table that we wish to update has collation set to utf8 - utf8_unicode_ci

And in hibernate I have set: < prop key="hibernate.connection.charSet">UTF-8

UTF-8 characters get replaced by ??? and this is of course especially bad for passwords and usernames + email as it basically kills them.

Anyone else encountered character encoding breaking when deploying to amazon?


The easiest solution is in the below link:


I've tried and succeeded.

The solution is essentially:

Create a new Parameter Group in RDS. What I changed was character_set_* and collation_*. There are about 8 settings, I changed all of them to utf8 and utf8_unicode_ci. Then assign your DB instance to use this new parameter group.

  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. – masegaloeh Sep 23 '14 at 1:42
  • @masegaloeh, Thanks for the reminder. I've updated the post. – volatilevar Sep 23 '14 at 6:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.