Uploaded image for project: 'Spring Roo'
  1. Spring Roo
  2. ROO-89

Roo+Hibernate+MySQL => Problem with UTF8 special chars

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 1.0.0.M1
    • 1.0.0.RC2
    • PERSISTENCE
    • None
    • WinXP SP3, MySQL 5.0.51a

    Description

      Scenario:
      simple entity with a String field plus according Control.

      If you enter e.g. german special chars like "München" or "Hänsel" into the form field (no matter whether this is a update or create) and save the data, the value get's stored as "M?chen" or "H?sel" into the MySQL-Database. I searched for this issue and found some tipps at the following blogs.

      http://www.it-blogger.com/2005-08-13/mysql-hibernate-und-utf8/
      http://twilia.blogspot.com/2007/09/hibernate-mit-mysql-und-utf8.html

      I tested their suggestions by adding some parameters to the database.properties "database.url" entry. It currently looks the following:
      database.url=jdbc\:mysql\://localhost\:3306/my_utf_test?autoReconnect\=true&useUnicode\=true&characterEncoding\=UTF-8

      I even tried to enter the url into the persistence.xml (see below) but neither of these things worked.
      <property name="hibernate.connection.url" value="jdbc:mysql://localhost/my_utf_test?useUnicode=true&characterEncoding=utf8&connectionCollation=utf8_general_ci&characterSetResults=utf8" />

      This bug makes ROO+Hibernate actually unusable for german based applications for me at the moment.

      Have you got any suggestions?

      Greets,
      Alex

      Attachments

        Issue Links

          Activity

            People

              sschmidt Stefan Schmidt
              aheusingfeld Alexander Heusingfeld
              Archiver:
              tmarshall Trevor Marshall

              Dates

                Created:
                Updated:
                Resolved:
                Archived: