WINDOWS: fix #6795. always read the terminal in unicode mode, and set the default codepage to Latin-1 (so that we can be certain that C programs can read/write ASCII data to the terminal successfully)