I initialized the Scanner class object in this manner:
Scanner scanner = new Scanner(new File("data.txt"),"utf-8");
When i try to read a file with chars like ç or é, scanner.hasNextLine()
returns false, scanner don't read nothing.
I tried to use "iso-8859-1". And file reading was successful. But file is UTF-8 file and chars like 'ç' are displayed as "ç".
Please help me solve the problem and make the program properly read and display UTF-8 characters.