1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00

Disable UTF-8 console handling on pre-NT Windows.

The w32old builds couldn't read a password from the console at all,
because ReadConsoleW would always return failure.
This commit is contained in:
Simon Tatham 2024-11-21 12:43:50 +00:00
parent 52b2419028
commit a71866aebb

View File

@ -78,7 +78,13 @@ static ConsoleIO *conio_setup(bool utf8)
conio->hin = conio->hout = INVALID_HANDLE_VALUE;
conio->need_close_hin = conio->need_close_hout = false;
conio->utf8 = utf8 && conio_use_utf8;
init_winver();
if (osPlatformId == VER_PLATFORM_WIN32_WINDOWS ||
osPlatformId == VER_PLATFORM_WIN32s)
conio->utf8 = false; /* no Unicode support at all */
else
conio->utf8 = utf8 && conio_use_utf8;
/*
* First try opening the console itself, so that prompts will go