1
I have a.txt file with the following values:
TESTE
17,00%
01/01/2014
25,55
AÇAILANDIA
When importing this txt in my Java application the special character Ç is not imported and the result is like this:
TESTE
17,00%
01/01/2014
25,55
A�AILANDIA
Below is the method I use to import the file:
private void lerArquivo4() throws FileNotFoundException {
//https://blog.caelum.com.br/lendo-arquivos-texto-em-java/
Scanner scanner = new Scanner(new FileReader("C:/Users/jallisson/Desktop/testejj.txt")).useDelimiter("\\||\\n");
while (scanner.hasNext()) {
String numero = scanner.next();
String matricula = scanner.next();
String materia = scanner.next();
String prova = scanner.next();
String nota = scanner.next();
System.out.println(numero);
System.out.println(matricula);
System.out.println(materia);
System.out.println(prova);
System.out.println(nota);
JOptionPane.showMessageDialog(this, nota, "Linha", JOptionPane.INFORMATION_MESSAGE);
}
}
thanks friend worked, only modified the "UFT-8" by "ISO-8859-1"
– jallisson jallis oliveira band