I'm trying to read a CSV file with the following characters: â/ô/etc. My code isn't parsing these characters well. I'm getting the � character/symbol instead of the real character.
This is the code I'm using for reading the CSV file:
private List<String[]> getRows(File f) throws IOException {
//FileReader fileReader = new FileReader(f);
InputStreamReader inputStreamReader = new InputStreamReader(new FileInputStream(f), "UTF-8");
try {
CSVReader reader = new CSVReader(inputStreamReader, ';');
try {
return reader.readAll();
} finally {
reader.close();
}
} finally {
inputStreamReader.close();
}
}
Who can help me? Thanks!