I'm having a queer issue. I have this code in Java:
Scanner keyboard = new Scanner(System.in);
System.out.print("Enter word: ");
String word = keyboard.nextLine();
System.out.println(word);
However, for special characters, the scanner class seems to be going wrong. For example, if I type in ħabel
I get ħabel
printed. Eclipse's console output is set as UTF-8, sure of that, so I think it's coming from the input. I haven't found any encoding options in the Scanner class really and funnily googling about didn't give solutions neither. How could this be solved?
Thanks!