To read a text file with a specific encoding you can use a FileInputStream in conjunction with a InputStreamReader. The right Java encoding for Windows ANSI is Cp1252.
reader = new BufferedReader(new InputStreamReader(new FileInputStream(csvFile), "Cp1252"));
To write a text file with a specific character encoding you can use a FileOutputStream together with a OutputStreamWriter.
writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file), "Cp1252"));
The classes InputStreamReader and OutputStreamWriter translate between byte oriented streams and text with a specific character encoding.
End of Line pro tip:
Making the servlet response:
response.setContentType("text/plain"); response.setCharacterEncoding("windows-1252"); response.addHeader("Content-Disposition", "attachment; filename=" + filenameVar+ ".txt");