title: How to Insert arabic data into mysql database by Java?
body: <p>I want to insert arabic information to the database but always get caracters like this : Ø§Ø¨Ùˆ Ù†Øµ. I use the UTF-8 encoding in my pages and i set my database to utf8_general_ci.</p>
  
  <p>I read many questions similar to this question but I don't find a solution for my case.</p>
  
  <p>this is a <a href="https://stackoverflow.com/questions/16575099/insert-arabic-data-into-mysql-database">solution</a> but with php and i don't know how to do the same thing in java.</p>
  
  <p><strong>The code of insert</strong>
  (by JdbcTemplate)</p>
  
  <pre><code>final String move_insert = "insert into r_movement (PPR,cd_fonc,nom_etabl,ville,delegation,date_debut,date_fin,nbjour,nbmois,nbannees,cina,cinn) "
                 + "values (?,?,?,?,?,?,?,?,?,?,?,?)";
  
         getJdbcTemplate()
         .update(move_insert, new Object[] {move.getPpr(),move.getFonction(),move.getNom_etabl(),move.getVille(),move.getDelegation(),move.getDate_debut(),move.getDate_fin(),c.getNbjours(),c.getNbmois(),c.getNbyears(),move.getCina(),move.getCinn()});
  </code></pre>
  
  <p><strong>This is my table :</strong></p>
  
  <pre><code>CREATE TABLE `r_movement` (
   `id_move` int(11) NOT NULL AUTO_INCREMENT,
   `PPR` int(11) NOT NULL,
   `cd_fonc` varchar(255) CHARACTER SET utf8 NOT NULL,
   `nom_etabl` varchar(255) CHARACTER SET utf8 NOT NULL,
   `ville` varchar(255) CHARACTER SET utf8 NOT NULL,
   `delegation` varchar(255) CHARACTER SET utf8 NOT NULL,
   `date_debut` date NOT NULL,
   `date_fin` date NOT NULL,
   `nbjour` int(255) NOT NULL,
   `nbmois` int(255) NOT NULL,
   `nbannees` int(255) NOT NULL,
   `CINA` varchar(255) CHARACTER SET utf8 NOT NULL,
   `CINN` varchar(255) CHARACTER SET utf8 NOT NULL,
   PRIMARY KEY (`id_move`)
  ) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8
  </code></pre>