ASCII silly question, Get a silly ANSI.
"I'm not back." - Bill Harding, Twister
ASCII silly question, Get a silly ANSI.
"I'm not back." - Bill Harding, Twister
No, it uses the "default charset", which is the system property "file.encoding". That's the default charset used to read and write files. In Windows systems it's commonly cp1252 whereas the encoding used by the console is something else.using new InputStreamReader(System.in) should use the same default encoding that the console uses.
"I'm not back." - Bill Harding, Twister
On Windows you type CHCP at the command line and it tells you that your code page is 437, or some other number. Stick a "cp" on the front of that and you've got your console charset. Try code like this to see if it works:The first line output should be wrong (something other than the accented letter) but the second should be right.How does one determine the console charset?
"I'm not back." - Bill Harding, Twister
Self destruct mode activated. Instructions for deactivation encoded in this tiny ad.
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
|