diff options
| author | Michael Soegtrop <MSoegtrop@yahoo.de> | 2017-06-05 13:01:17 +0000 |
|---|---|---|
| committer | Michael Soegtrop <MSoegtrop@yahoo.de> | 2017-06-05 13:01:17 +0000 |
| commit | 509ca3687330fea576ea67ae6c7f31d16e66b800 (patch) | |
| tree | 9097520c54e355ded9bd0b4d6618af4e8dacdd91 /src/winconsole.cpp | |
| parent | updated to latest trunk (diff) | |
| parent | [Bug #1695016] Xaml export misses some radialGradients. (diff) | |
| download | inkscape-509ca3687330fea576ea67ae6c7f31d16e66b800.tar.gz inkscape-509ca3687330fea576ea67ae6c7f31d16e66b800.zip | |
updated to latest trunk
(bzr r14876.2.4)
Diffstat (limited to 'src/winconsole.cpp')
| -rw-r--r-- | src/winconsole.cpp | 8 |
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; } |
