Changeset 2984 for box/trunk


Ignore:
Timestamp:
27/08/2011 15:49:46 (9 months ago)
Author:
chris
Message:

Log failure to convert log string to console encoding on Windows.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • box/trunk/lib/common/Logging.cpp

    r2965 r2984  
    347347        #ifdef WIN32 
    348348                std::string output = buf.str(); 
    349                 ConvertUtf8ToConsole(output.c_str(), output); 
    350                 fprintf(target, "%s\n", output.c_str()); 
     349                if(ConvertUtf8ToConsole(output.c_str(), output) == false) 
     350                { 
     351                        fprintf(target, "%s (and failed to convert to console encoding)\n", 
     352                                output.c_str()); 
     353                } 
     354                else 
     355                { 
     356                        fprintf(target, "%s\n", output.c_str()); 
     357                } 
    351358        #else 
    352359                fprintf(target, "%s\n", buf.str().c_str()); 
Note: See TracChangeset for help on using the changeset viewer.