Simple UTF-8 file writing


/ Published in: Java
Save to your folder(s)



Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.