title: how to write chinese caracters into mysql with hibernate?
body: <p>im making a web application with javascript. Im using java servlet wich is connected with mysql database with hibernate. in Servlet there is a String in chinese, and when i try to write that strin into mysql field it shows up as "?" in mysql. my whole project in netbeans is set to charset=UTF-8. I tried to set collation and charset in database to utf-8, utf8mb4, big5 and none of them works. i also tried to change my column from varchar to nvarchar but when i click apply (mysql workbench) the column is still "varchar".</p>
  
  <p>this is my servlet</p>
  
  <pre><code>protected void processRequest(HttpServletRequest request, HttpServletResponse response)
              throws ServletException, IOException {
          response.setContentType("application/json");
          String tabla=request.getParameter("tabla");
          //String tabla contains chinese caracters
          String user=request.getParameter("user");
          Configuration myConf = new Configuration();
          myConf.configure("hib/hibernate.cfg.xml");
          StandardServiceRegistry service = new StandardServiceRegistryBuilder().
                  applySettings(myConf.getProperties()).build();
          SessionFactory myFactory = myConf.buildSessionFactory(service);
          Session conn = myFactory.openSession();
          Transaction t = conn.beginTransaction();
  
          List&lt;User&gt;upislista;
          upislista=conn.createQuery("SELECT u FROM User u WHERE useUsername='"+user+"'").list();
          upislista.get(0).setUseKineski(tabla);
  
  
  
  
  
          t.commit();
          conn.close();
  </code></pre>