I'm trying to write a file with special characters in filename, for examplo "tééé ê.mp3", but the filename always stay with "?" instead the character "é", I tried a several methods but i didn't found a solution:
String musicName = new String("tééé ê.mp3".getBytes(), "UTF-8");
OutputStreamWriter bw = new OutputStreamWriter(new FileOutputStream(FILE_PATH+"musics/"+musicName), "UTF-8");
bw.write(data);
bw.close();
I tried this way too.
OutputStreamWriter bw = new OutputStreamWriter(new FileOutputStream(URLDecoder.decode(FILE_PATH+"musics/tééé ê.mp3", "UTF-8")), "UTF-8");
bw.write(data);
bw.close();