title: java insert special characters in mysql
body: <p>I use the below java code to insert data in mysql</p>
  
  <pre><code>private Long insertMFPatient() {
      KeyHolder keyHolder = new GeneratedKeyHolder();
      jdbcTemplate.update(new PreparedStatementCreator() {
          public PreparedStatement createPreparedStatement(
                  Connection connection) throws SQLException {
              PreparedStatement ps = connection.prepareStatement(
                      "insert into test(firstname, lastname) values(?,?)",
                      new String[] { "changeid" });
              ps.setString(1, "mamá");
              ps.setString(2, "test2");
              return ps;
          }
      }, keyHolder);
      return keyHolder.getKey().longValue();
  
  }
  </code></pre>
  
  <p>On inserting text like mamá the data stored in mysql is mamÃ¡
  What should I do to correct this ?
  So far 
  1. I have updated the table encoding type to UTF-8
  2. updated the connectionstring like jdbc:mysql://localhost:3306/test?useUnicode=true&amp;characterEncoding=UTF-8</p>
  
  <p>Please help</p>