I am reading Chinese and Spanish data from the Database and writing into CSV file. I am using UTF-16. when I open CSV file in Excel þÿ is getting prepended. How do I avoid writing þÿ into CSV?
FileOutputStream os = new FileOutputStream("s.csv", false)
CSVWriter out = new CSVWriter(
new BufferedWriter(
new OutputStreamWriter(os, "UTF-16"
)));
private void write(String[] values) throws IOException {
out.writeNext(values);
}