Skip to content

Commit

Permalink
Use a large buffer to prevent Windows from chopping valid UTF-8 seque…
Browse files Browse the repository at this point in the history
…nces.
  • Loading branch information
netheril96 committed Sep 17, 2019
1 parent a9a354e commit 1e7025c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sources/win.cpp
Expand Up @@ -1082,6 +1082,9 @@ std::string OSService::stringify_system_error(int errcode)
void windows_init(void)
{
::SetConsoleOutputCP(CP_UTF8);
// Use a large buffer to prevent Windows from chopping valid UTF-8 sequences.
setvbuf(stdout, nullptr, _IOFBF, 65535);
setvbuf(stderr, nullptr, _IOFBF, 65535);
if (::FspLoad(nullptr) != STATUS_SUCCESS)
{
fputs("SecureFS cannot load WinFsp. Please make sure you have WinFsp properly installed.\n",
Expand Down

0 comments on commit 1e7025c

Please sign in to comment.