title: Why java strings are not saved as UTF-8 in MYSQL?
body: <pre><code>message = new String(("round " + id).getBytes("UTF-8"));
  
  conn = DriverManager.getConnection("jdbc:mysql://" + host + "/" + db + "?useUnicode=true&amp;characterEncoding=UTF-8&amp;"
                + "user=" + login + "&amp;password=" + password);
  </code></pre>
  
  <p>When I make an insert into the database which encoding is <code>UTF-8 CI</code>, get  something like this <code>�������������������� 179</code>, the java file encoding is utf-8, what I'am doing wrong?</p>
  
  <pre><code>+--------------------------+----------------------------+
  | Variable_name            | Value                      |
  +--------------------------+----------------------------+
  | character_set_client     | utf8                       |
  | character_set_connection | utf8                       |
  | character_set_database   | utf8                       |
  | character_set_filesystem | binary                     |
  | character_set_results    | utf8                       |
  | character_set_server     | utf8                       |
  | character_set_system     | utf8                       |
  | character_sets_dir       | /usr/share/mysql/charsets/ |
  +--------------------------+----------------------------+
  </code></pre>