title: Hibernate encodes wrong while persisting objects [UTF-8]
body: <p>I'm facing with UTF-8 encoding problem while persisting my model objects. In Turkish '<strong>ı</strong>' is a letter. Also there're some other Turkish characters that is included in UTF-8 encoding. While I persist my model objects, all '<strong>ı</strong>' characters are persisted as '<strong>?</strong>' to DB. I'm using <strong>MySQL 5.5 on Ubuntu Linux 64-bit OS</strong>. Also I've already set hibernate &amp; c3p0 connection encoding property to UTF-8 too. When I debug, the data comes from client is true. </p>
  
  <p>Here's my config and I'll be so happy if someone can help me. </p>
  
  <p>Thanks in advance.</p>
  
  <hr>
  
  <p><strong>Spring &amp; Hibernate Config</strong></p>
  
  <pre><code>    &lt;bean id="sessionFactory" class="org.springframework.orm.hibernate4.LocalSessionFactoryBean"&gt;
          &lt;property name="dataSource"&gt;&lt;ref local="dataSource"/&gt;&lt;/property&gt;
          &lt;property name="packagesToScan" value="com.tk.dms.model" /&gt;
          &lt;property name="hibernateProperties"&gt;
              &lt;props&gt;
                  &lt;prop key="hibernate.show_sql"&gt;true&lt;/prop&gt;
                  &lt;prop key="hibernate.use_sql_comments"&gt;true&lt;/prop&gt;
                  &lt;prop key="hibernate.format_sql"&gt;false&lt;/prop&gt;
                  &lt;prop key="hibernate.hbm2ddl.auto"&gt;update&lt;/prop&gt;
                  &lt;prop key="hibernate.generate_statistics"&gt;true&lt;/prop&gt;
                  &lt;prop key="hibernate.dialect"&gt;org.hibernate.dialect.MySQL5InnoDBDialect&lt;/prop&gt;
                  &lt;prop key="hibernate.connection.characterEncoding"&gt;UTF-8&lt;/prop&gt;
                  &lt;prop key="hibernate.connection.useUnicode"&gt;true&lt;/prop&gt;
                  &lt;!-- c3p0 properties --&gt;
                  &lt;prop key="hibernate.c3p0.min_size"&gt;2&lt;/prop&gt;
                  &lt;prop key="hibernate.c3p0.max_size"&gt;50&lt;/prop&gt;
                  &lt;prop key="hibernate.c3p0.maxPoolSize"&gt;50&lt;/prop&gt;
                  &lt;prop key="hibernate.c3p0.minPoolSize"&gt;2&lt;/prop&gt;
                  &lt;prop key="hibernate.c3p0.initialPoolSize"&gt;2&lt;/prop&gt;
                  &lt;prop key="hibernate.c3p0.timeout"&gt;300&lt;/prop&gt;
                  &lt;prop key="hibernate.c3p0.max_statements"&gt;50&lt;/prop&gt;                
              &lt;/props&gt;
          &lt;/property&gt;
      &lt;/bean&gt;
  </code></pre>