Console input (win), how is the charset convertion working?
Code below, non-ascii chars output garbage - InputStreamReader in the below example doesn't take charset as an argument.
BufferedReader console = new BufferedReader( new InputStreamReader(System.in));
String inp = console.readLine();
System.out.println(inp.toUpperCase());
Being os-independent, how does Java solve all different possible charset configurations regarding console prompt input?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…