title: Converting to utf-8 in java
body: <p>I just have the string <code>\u0130smail</code> and I want to convert it to 
  İsmail and also convert</p>
  
  <pre><code>  \u0130 --&gt; İ   
    \u00E7 --&gt; ç
  </code></pre>
  
  <p>I tried </p>
  
  <pre><code>String str = "\u0130smail";
  sysout(str); 
  </code></pre>
  
  <p>and it worked, but whenever I get the string <code>"\u0130smail"</code> from the DB or the internet it doesn't give the correct result.</p>
  
  <pre><code>static String deneme(String string){
      String string2 = null;
  
      try {
          byte[] utf8 = string.getBytes("UTF-8");
          string2 = new String(utf8, "UTF-8");
      } catch (UnsupportedEncodingException e) {
      }
      return string2;
  }
  </code></pre>
  
  <p>didn't work either.</p>