When we use grails with MySQL the default character encoding is ISO/IEC 8859-1 also called Latin 1. If we want our application to support UTF-8 character encoding then we need to do some configurations.

Following are the simple steps for UTF-8 character encoding in grails application:

  • Changes in Grails:

    Open your DataSource.groovy and change url in dataSource like:

  • Changes in MySQL:
    Create your database that can support UTF-8 character encoding using the following command in MySQL console:

and that’s all.

Hope this helps 🙂 .