title: JPA utf-8 characters not persisted
body: <p>I have a simple web application where I use JPA. </p>
  
  <p>I have an entity called <strong>BlogEntry</strong>. </p>
  
  <p>When I submit a new BlogEntry, when I debug my application I see the utf8 characters just fine.</p>
  
  <p>For example</p>
  
  <pre><code>em.persist(entity);
  </code></pre>
  
  <p>In this line, if I debug for example:</p>
  
  <pre><code>entity.getTitle()
  </code></pre>
  
  <p>I can successfuly see utf-8 characters in the IDE. ( like ğğ, or çç )</p>
  
  <p>Also, my database has UTF8 collation and I can insert utf-8 characters just fine with sql using like "INSERT INTO..." </p>
  
  <p>However, with JPA, the characters are persisted as ???? </p>
  
  <p>Why might this be? </p>
  
  <p>Regards.</p>
  
  <p>Here is my persistence.xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;persistence xmlns="http://java.sun.com/xml/ns/persistence" version="2.0"&gt;
      &lt;persistence-unit name="Persistence"&gt;
          &lt;provider&gt;org.hibernate.ejb.HibernatePersistence&lt;/provider&gt;
          &lt;class&gt;com.tugay.blog.core.model.Blogentry&lt;/class&gt;
          &lt;properties&gt;
              &lt;property name="javax.persistence.jdbc.driver" value="com.mysql.jdbc.Driver"/&gt;
              &lt;property name="javax.persistence.jdbc.url" value="jdbc:mysql://localhost:3306/blogdatabase"/&gt;
              &lt;property name="javax.persistence.jdbc.user" value="root"/&gt;
              &lt;property name="javax.persistence.jdbc.password" value="aabbccdd"/&gt;
          &lt;/properties&gt;
      &lt;/persistence-unit&gt;
  &lt;/persistence&gt;
  </code></pre>