title: Hex to ascii conversion in java shoes some special characters
body: <p>I have a hex string and I am converting it to <strong>ascii</strong>, but result shows output with some special chars.</p>
  
  <blockquote>
    <p>Actual string = adsfads
    output string = adsfads���</p>
  </blockquote>
  
  <pre><code>String hex = "61647366616473000000";
  
  StringBuilder output = new StringBuilder();
  for (int i = 0; i &lt; hex.length(); i+=2) {
      String str = hex.substring(i, i+2);
      int decimal = Integer.parseInt(str, 16);   
      output.append((char)decimal);
  }
  
  System.out.println(output);
  </code></pre>