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

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 1.0.0.M1
    • Fix Version/s: 1.0.0.RC2
    • Component/s: PERSISTENCE
    • Labels:
      None
    • Environment:
      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

              • Assignee:
                sschmidt Stefan Schmidt
                Reporter:
                aheusingfeld Alexander Heusingfeld
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: