1) Practically speaking : how do Character Encodings work, and how you should deal with them :
Any character stream that is read in is Encoded/Decoded. Java bundles the encoding/decoding specifics as part of the JDK : http://docs.oracle.com/javase/1.6/docs/guide/intl/encoding.doc.html. Example : UTF-8 issue in Java code.
2) Your specific question : HOW does the cross-platform JAVA language handle console input which is OS-specific ?
The short answer : Although Java byte-code is platform neutral, the JVM is NOT. That is, the java "System" "in/out/err" streaming functionality is not implemented fully in regular old java !
When you RUN java, the "System" class, which abstracts the basic notion of a system that the JVM is running in, is loaded. In this time, it's input/output/error streams are (i.e. the objects you are accessing when you type System.in , System.out, System.err are set up at RUNTIME by the ClassLoader which is responsible for, well ... loading java classes.
In the case of "System", ClassLoading is a sophisticated task, as you imply, because setting up the System class (just like setting up the java Runtime class) is a lower level JVM implementation issue is OS specific.
Again, just to be clear : Although the Java LANGUAGE is platform-independent, the JVM for your platform is thus, unlike the Java programming language, an OS specific environment that creates the resources we reference in our code for us at runtime.
For more understanding : Checkout the actual source code for the System class, its very readable and will give you a better understanding whats going on. In particular, look at the nullInputStream() method :
http://www.java2s.com/Open-Source/Java-Document/6.0-JDK-Core/lang/java/lang/System.java.htm