title: Java FileWriter lost special characters
body: <p>I've this code</p>
  
  <pre><code> //write a file in a specific directory
  public static void writeFile(String comment, String outputFileName) {
      FileWriter fWriter = null;
      BufferedWriter writer = null; 
      try {
          fWriter = new FileWriter(outputFileName,true);
          writer = new BufferedWriter(fWriter);
          writer.write(comment);
          writer.newLine();
          writer.close();
      } catch (Exception e) {
          System.out.println(e.getMessage());
      }
  }
  </code></pre>
  
  <p>But when I save the file in outputFileName, it lost every special character.</p>
  
  <p>File output format is .txt</p>
  
  <p>Some solution?</p>
  
  <p>Thanks a lot</p>