cygwin: clear screen using wide char function

FillConsoleOutputCharacterA doesn't work correctly in codepage 65001
(UTF-8).  Looks like the character conversion function from ascii char
to unicode char works incorrectly then.  Use FillConsoleOutputCharacterW
instead.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen 2017-07-31 11:43:35 +02:00
parent 0e0900cb40
commit 9374e7f65d

View File

@ -1319,7 +1319,7 @@ dev_console::clear_screen (HANDLE h, int x1, int y1, int x2, int y2)
tlc.X = x2;
tlc.Y = y2;
}
FillConsoleOutputCharacterA (h, ' ', num, tlc, &done);
FillConsoleOutputCharacterW (h, L' ', num, tlc, &done);
FillConsoleOutputAttribute (h, current_win32_attr, num, tlc, &done);
}