title: Generate CSV via Apache CSV in UTF-8
body: <p>how to write CSV File in UTF-8 via Apache CSV?</p>
  
  <p>I am trying generate csv by following code where Files.newBufferedWriter() encode text into UTF-8 by default, but when I open generated text in excel there are senseless characters.</p>
  
  <p>I create CSVPrinter like this:</p>
  
  <pre><code>CSVPrinter csvPrinter = new CSVPrinter(Files.newBufferedWriter(Paths.get(filePath)), CSVFormat.EXCEL);
  </code></pre>
  
  <p>next I set headers </p>
  
  <pre><code>csvPrinter.printRecord(headers);
  </code></pre>
  
  <p>and next in loop I print values into writer like this</p>
  
  <pre><code>csvPrinter.printRecord("value1", "valu2", ...);
  </code></pre>
  
  <p>I also tried upload file into online CSV lint validator and it tells that I am using ASCII-8BIT instead of UTF-8. What I did wrong?</p>