From a6dd3f957f5979fa34a05ba963862de7d0d9df61 Mon Sep 17 00:00:00 2001 From: Adrian Johnson Date: Sun, 12 Nov 2017 10:33:07 +1030 Subject: 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. --- utils/pdftocairo.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'utils/pdftocairo.cc') 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 @@ -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); -- cgit v1.2.3