diff options
author | Chris Wilson <chris+github@qwirx.com> | 2008-08-09 07:09:06 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2008-08-09 07:09:06 +0000 |
commit | 687c7eba4efd9b734ad8802e174c874a302ae0b3 (patch) | |
tree | 2a63b5d0b068eb5bcbd9dbd96fb4da6cc1d1c9ca /lib/common/Logging.cpp | |
parent | 33a3d225c7780a5f5d38a5ac5fd068f445e5a434 (diff) |
Convert console logging output to console encoding on Windows.
Diffstat (limited to 'lib/common/Logging.cpp')
-rw-r--r-- | lib/common/Logging.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/common/Logging.cpp b/lib/common/Logging.cpp index 3cd8c219..3edb5ce6 100644 --- a/lib/common/Logging.cpp +++ b/lib/common/Logging.cpp @@ -317,7 +317,13 @@ bool Console::Log(Log::Level level, const std::string& rFile, buf << rMessage; - fprintf(target, "%s\n", buf.str().c_str()); + #ifdef WIN32 + std::string output = buf.str(); + ConvertUtf8ToConsole(output.c_str(), output); + fprintf(target, "%s\n", output.c_str()); + #else + fprintf(target, "%s\n", buf.str().c_str()); + #endif return true; } |