summaryrefslogtreecommitdiff
path: root/lib/common/Logging.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/common/Logging.cpp')
-rw-r--r--lib/common/Logging.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/common/Logging.cpp b/lib/common/Logging.cpp
index e4477a2c..83efbc23 100644
--- a/lib/common/Logging.cpp
+++ b/lib/common/Logging.cpp
@@ -346,8 +346,15 @@ bool Console::Log(Log::Level level, const std::string& rFile,
#ifdef WIN32
std::string output = buf.str();
- ConvertUtf8ToConsole(output.c_str(), output);
- fprintf(target, "%s\n", output.c_str());
+ if(ConvertUtf8ToConsole(output.c_str(), output) == false)
+ {
+ fprintf(target, "%s (and failed to convert to console encoding)\n",
+ output.c_str());
+ }
+ else
+ {
+ fprintf(target, "%s\n", output.c_str());
+ }
#else
fprintf(target, "%s\n", buf.str().c_str());
#endif