title: UTF Encoding in java
body: <p>I need to encode a message from request and write it into a file. Currently I am using the <code>URLEncoder.encode()</code> method for encoding. But it is not giving the expected result for special characters in French and Dutch. </p>
  
  <p>I have tried using <code>URLEncoder.encode("msg", "UTF-8") also.</code> </p>
  
  <p>Example:<br>
  Original message: Pour gérer votre GSM<br>
  After encoding: Pour g?rer votre GSM</p>
  
  <p>Can any one tell me which method I can use for this purpose?</p>