diff options
author | Gluzskiy Alexandr <sss123next@list.ru> | 2010-10-21 05:34:01 +0300 |
---|---|---|
committer | Gluzskiy Alexandr <sss123next@list.ru> | 2010-10-21 05:34:01 +0300 |
commit | d5baf212f45c3926ffec3bccad77ca4dd0751d23 (patch) | |
tree | 4f32bd925082bc78ecdcf0a1e98b53655a8faa69 /log.cpp | |
parent | 64624c111e4a8a3a156190a8d6d3ee4d2e528f39 (diff) |
using utf8<->utf16 on poor c++ instead of miranda api (can solve some issues with badly encoded messages, testing needed)
Diffstat (limited to 'log.cpp')
-rw-r--r-- | log.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
@@ -22,12 +22,10 @@ logtofile& logtofile::operator<<(TCHAR *buf) if(bDebugLog) { log_mutex.lock(); - char *tmp = mir_utf8encodeW(buf); log.open(path, std::ios::app |std::ios::ate); - log<<tmp; + log<<toUTF8(buf); log.close(); log_mutex.unlock(); - mir_free(tmp); } return *this; } @@ -37,12 +35,10 @@ logtofile& logtofile::operator<<(char *buf) if(bDebugLog) { log_mutex.lock(); - char *tmp = mir_utf8encode(buf); log.open(path, std::ios::app |std::ios::ate); - log<<tmp; + log<<buf; log.close(); log_mutex.unlock(); - mir_free(tmp); } return *this; } @@ -67,12 +63,10 @@ logtofile& logtofile::operator<<(wstring buf) if(bDebugLog) { log_mutex.lock(); - char *tmp = mir_utf8encodeW(buf.c_str()); log.open(path, std::ios::app |std::ios::ate); - log<<tmp; + log<<toUTF8(buf); log.close(); log_mutex.unlock(); - mir_free(tmp); } return *this; } |