Posted By

studioevoque on 11/03/10


Tagged

java io utf-8


Versions (?)

Simple UTF-8 file writing


 / Published in: Java
 

  1. String filePath = "C:\temp.txt";
  2. PrintWriter fout = new PrintWriter( new File(filePath), "UTF-8");
  3.  
  4. fout.println("This will print a line");
  5.  
  6. fout.close();

Report this snippet  

You need to login to post a comment.