[Box Backup-commit] COMMIT r2984 - box/trunk/lib/common
subversion at boxbackup.org
subversion at boxbackup.org
Sat Aug 27 15:49:47 BST 2011
Author: chris
Date: 2011-08-27 15:49:46 +0100 (Sat, 27 Aug 2011)
New Revision: 2984
Modified:
box/trunk/lib/common/Logging.cpp
Log:
Log failure to convert log string to console encoding on Windows.
Modified: box/trunk/lib/common/Logging.cpp
===================================================================
--- box/trunk/lib/common/Logging.cpp 2011-08-27 14:06:46 UTC (rev 2983)
+++ box/trunk/lib/common/Logging.cpp 2011-08-27 14:49:46 UTC (rev 2984)
@@ -346,8 +346,15 @@
#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
More information about the Boxbackup-commit
mailing list