diff --git a/progressmeter.c b/progressmeter.c index 00bef4e..3d6f56b 100644 --- a/progressmeter.c +++ b/progressmeter.c @@ -237,7 +237,14 @@ refresh_progress_meter(void) strlcat(buf, " ", win_size); } +#ifdef WINDOWS + wchar_t* wtmp = utf8_to_utf16(buf); + WriteConsoleW(GetStdHandle(STD_OUTPUT_HANDLE), wtmp, wcslen(wtmp), 0, 0); + WriteConsoleW(GetStdHandle(STD_OUTPUT_HANDLE), L"\n", 1, 0, 0); + free(wtmp); +#else atomicio(vwrite, STDOUT_FILENO, buf, win_size - 1); +#endif last_update = now; }