Possible Duplicate:
Read/write .txt file with special characters
Im reading a file but I dont know how to read the accents and special caracters, here is mo code for read I read I have to add a different codification but i dont know how to doit
File file = new File("C://fichero.csv");
BufferedReader bufRdr = new BufferedReader(new FileReader(file));
String line = null;
line = bufRdr.readLine();
Thanks
Try with the following:
File file = new File("C://fichero.csv");
BufferedReader bufRdr = new BufferedReader(
new InputStreamReader(new FileInputStream(file),"ISO-8859-1"));
String line = null;
line = bufRdr.readLine();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With