summaryrefslogtreecommitdiffstats
path: root/src/winconsole.cpp
diff options
context:
space:
mode:
authorMichael Soegtrop <MSoegtrop@yahoo.de>2017-06-05 13:56:11 +0000
committerMichael Soegtrop <MSoegtrop@yahoo.de>2017-06-05 13:56:11 +0000
commit7ee81350c73388881e60a59928d26764b7172c9b (patch)
treeb561a4dbbacd7eecbdbae3fa220a353375ccecf8 /src/winconsole.cpp
parentupdated to trunk (diff)
parent[Bug #1695016] Xaml export misses some radialGradients. (diff)
downloadinkscape-7ee81350c73388881e60a59928d26764b7172c9b.tar.gz
inkscape-7ee81350c73388881e60a59928d26764b7172c9b.zip
merged with latest version of lpe-bool and trunk
(bzr r14862.2.3)
Diffstat (limited to 'src/winconsole.cpp')
-rw-r--r--src/winconsole.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/winconsole.cpp b/src/winconsole.cpp
index 085fb441c..f91b19c5c 100644
--- a/src/winconsole.cpp
+++ b/src/winconsole.cpp
@@ -100,6 +100,11 @@ int main()
// it guarantees perfect behavior w.r.t. quoting
WCHAR *cmd = GetCommandLineW();
+ // temporarily switch console encoding to UTF8 while the spwaned process runs
+ // as everything else is a mess and it seems to work just fine
+ const unsigned int initial_cp = GetConsoleOutputCP();
+ SetConsoleOutputCP(CP_UTF8);
+
// set up the pipes and handles
stdin.echo_read = GetStdHandle(STD_INPUT_HANDLE);
stdout.echo_write = GetStdHandle(STD_OUTPUT_HANDLE);
@@ -148,6 +153,9 @@ int main()
// wait until the standard output thread terminates
WaitForSingleObject(stdout_thread, INFINITE);
+ // switch back to initial console encoding
+ SetConsoleOutputCP(initial_cp);
+
return 0;
}