I have a problem with my Csv file, In my app I want to insert all the data base to a Csv file and send it via email. Every thing goes great except one thing- the encoding of the file isn't UTF-8 so every time I send the file via email I have to change the encoding my self.
I didn't find any way I can change the encoding when I create the file, so I wanna know if it is possible to insert a csv file to the resource folder in my app with encoding UTF-8, and then send this file via email.
So what I am asking is, Is it possible? And if so, how can I do it?
I am currently creating the csv file with openCSV
String csv = android.os.Environment.getExternalStorageDirectory().getAbsolutePath();
try {
File myFile = new File(csv + "/Data.csv");
myFile.createNewFile();
CSVWriter writer = new CSVWriter(new FileWriter(myFile), ',');
}