Fix progress meter utf8

This commit is contained in:
Ray Hayes 2016-10-22 00:20:42 -07:00
parent 58a582815f
commit 0b55122f42

View File

@ -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;
}