i work on a project of contacts i copy all the contacts and write them to csv file and then i upload them to firebase .
when i open this file (in any device) , i see that the contacts that writed with hebrew letters look weird.
this is my code :
public void generateNoteOnSD(Context context, String sFileName, String sBody) throws Exception {
try {
File root = new File(Environment.getExternalStorageDirectory(), "ProjectContacts");
if (!root.exists()) {
root.mkdirs();
}
File gpxfile = new File(root, sFileName);
FileWriter writer = new FileWriter(gpxfile);
OutputStreamWriter writer =new FileWriter(gpxfile);
writer.append(sBody);//
writer.flush();
writer.close();
Toast.makeText(context, "Saved", Toast.LENGTH_SHORT).show();
//Toast.makeText(context, "Start upload", Toast.LENGTH_LONG).show();
//UploadCsvFile(gpxfile);
} catch (IOException e) {
e.printStackTrace();
}
}
sBody contain hebrew letters
i wish someone can help my . thanks.