summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorMikalaiR <nikolay.romanovich@narod.ru>2016-02-29 16:34:59 +0000
committerMikalaiR <nikolay.romanovich@narod.ru>2016-02-29 16:34:59 +0000
commit529d1a105104891edf8905cc3ecd1359a4e7c6aa (patch)
treeb6372e2055991be03677bcf39f6ea31ad54202c2 /plugins
parentce418f5b2c85687ff1d8f9630224f7bb8b0f8393 (diff)
MimCmd: unicode in output
git-svn-id: http://svn.miranda-ng.org/main/trunk@16379 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r--plugins/MimCmd/src/MimCmd.cpp4
-rw-r--r--plugins/MimCmd/src/stdafx.h4
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 <stdio.h>
#include <windows.h>
+#include <iostream>
+#include <io.h>
+#include <fcntl.h>
+
#define NO_MIMCMD_COMMANDS
#include <newpluginapi.h>