Possible Duplicate:
How to write a UTF-8 file with Java?
I want to create a csv file using java and write into it which supporting UTF-8. How can I do this.?
Possible Duplicate:
How to write a UTF-8 file with Java?
I want to create a csv file using java and write into it which supporting UTF-8. How can I do this.?
new OutputStreamWriter(new FileOutputStream("path/to/file"), Charset.forName("UTF-8"))
Writer myWriter= new BufferedWriter(new OutputStreamWriter(
new FileOutputStream("filename"), "UTF-8"));
try {
myWriter.write(stringdata);
} catch(Exception e){
e.printStacktrace();
}