diff options
author | Adrian Johnson <ajohnson@redneon.com> | 2017-11-12 10:33:07 +1030 |
---|---|---|
committer | Adrian Johnson <ajohnson@redneon.com> | 2017-11-15 18:53:23 +1030 |
commit | a6dd3f957f5979fa34a05ba963862de7d0d9df61 (patch) | |
tree | b407bf3a4015aab1ba8cec15d8410dac814826b8 /utils/pdftocairo.cc | |
parent | 49107ffcd4d3c9b18fc950d37bede08f89bcfcda (diff) |
Support unicode on windows console
The Win32Console should be used in programs that require unicode
support for command line arguments and stdio ouput on windows. On
windows it gets the command line arguments from GetCommandLineW and
converts to UTF-8, and redefines the stdio output functions to convert
UTF-8 to calls to WriteConsoleW. On other platforms this class is a
no-op.
Diffstat (limited to 'utils/pdftocairo.cc')
-rw-r--r-- | utils/pdftocairo.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/utils/pdftocairo.cc b/utils/pdftocairo.cc index 46f3e1e2..7a5ef981 100644 --- a/utils/pdftocairo.cc +++ b/utils/pdftocairo.cc @@ -55,6 +55,7 @@ #include "PDFDoc.h" #include "PDFDocFactory.h" #include "CairoOutputDev.h" +#include "Win32Console.h" #ifdef USE_CMS #ifdef USE_LCMS1 #include <lcms.h> @@ -943,6 +944,7 @@ int main(int argc, char *argv[]) { int num_outputs; // parse args + Win32Console win32Console(&argc, &argv); if (!parseArgs(argDesc, &argc, argv)) { printUsage("pdftocairo", 0, argDesc); exit(99); |