]> sourceware.org Git - newlib-cygwin.git/commitdiff
cygwin: clear screen using wide char function
authorCorinna Vinschen <corinna@vinschen.de>
Mon, 31 Jul 2017 09:43:35 +0000 (11:43 +0200)
committerCorinna Vinschen <corinna@vinschen.de>
Mon, 31 Jul 2017 09:43:35 +0000 (11:43 +0200)
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>
winsup/cygwin/fhandler_console.cc

index 3e17fd9a4168fa3f690d52ee6f0a0c4552204327..bf4366a65c51b961cd03bf9528b86b948d63688e 100644 (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);
 }
 
This page took 0.032567 seconds and 5 git commands to generate.