From 529d1a105104891edf8905cc3ecd1359a4e7c6aa Mon Sep 17 00:00:00 2001 From: MikalaiR Date: Mon, 29 Feb 2016 16:34:59 +0000 Subject: MimCmd: unicode in output git-svn-id: http://svn.miranda-ng.org/main/trunk@16379 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/MimCmd/src/MimCmd.cpp | 4 ++-- plugins/MimCmd/src/stdafx.h | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/plugins/MimCmd/src/MimCmd.cpp b/plugins/MimCmd/src/MimCmd.cpp index 12583d3f88..f4cfed40e2 100644 --- a/plugins/MimCmd/src/MimCmd.cpp +++ b/plugins/MimCmd/src/MimCmd.cpp @@ -30,8 +30,7 @@ int lpprintf(const char *format, ...) char buffer[MAX_SIZE] = { 0 }; int len = _vsnprintf(buffer, MAX_SIZE, format, va); va_end(va); - CharToOemBuffA(buffer, buffer, len); - printf("%s", buffer); + std::wcout << (wchar_t*)_A2T(buffer); return len; } @@ -71,6 +70,7 @@ void ShowVersion() int main(int argc, char *argv[]) { + _setmode(_fileno(stdout), _O_U16TEXT); if (argc == 2 && !strcmp(argv[1], "-v")) { ShowVersion(); return 0; diff --git a/plugins/MimCmd/src/stdafx.h b/plugins/MimCmd/src/stdafx.h index 8fb740fa75..2bb58cfe34 100644 --- a/plugins/MimCmd/src/stdafx.h +++ b/plugins/MimCmd/src/stdafx.h @@ -21,6 +21,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include #include +#include +#include +#include + #define NO_MIMCMD_COMMANDS #include -- cgit v1.2.3