title: How to handle special characters in Java?
body: <p>I want to save a comment which is given by the user in DB as a CLOB. It's working fine. Later I got issue with special characters. If a user copy pastes the comment from a WordPad and it contains <strong>"single quote"</strong> or some special characters(they are bit different from usual) they are converting into <strong>reversed question mark</strong> or some <strong>square box</strong>. I tried to handle them by using below code. <a href="https://i.stack.imgur.com/hOTEy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hOTEy.png" alt="enter image description here"></a></p>
  
  <pre><code>values[4] = new String(values[4].getBytes("ISO-8859-1"), "UTF-8");
  </code></pre>
  
  <p>But still I'm getting square boxes. After debugging the issue what I realized is, it is not able to handle a <strong>space</strong>. Please see the attached image</p>
  
  <p><strong>Note:</strong> the comment length is 122 and it failed to handle only one space. I don't know what's wrong with that space.</p>