When you call Scanner(InputStream)
, that will use the platform default encoding to convert the bytes from the stream into text.
I suspect you simply need to work out what encoding your console is using, and use that either to construct an InputStreamReader
around System.in
to start with, or pass the encoding name as a second argument to the constructor.