4
I am using Scanner to read some keyboard data, however, accents and special characters are not identified.
For example: João and Maurício appear with a small square in the accented letter, however, if I type these words in the screen output is no problem. Show up straight.
I tried with static Locale PORTUGUESE;
but it didn’t work out.
How can I make it work?
Thank you
EDIT
My code is like this at the moment:
package Trabalho_final;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Scanner;
public class Funcionario
{
private String nome, email, telefone;
private float salario;
Scanner ler = new Scanner(System.in,"UTF-8");
//............ restante do código
Put the code you already have so we can help. Another question, is running your program on
cmd
or in theconsole da IDE
?– Ilario Junior