X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmain.cpp;h=65a9f4d8d7da10e7537ea51fbb53d49ef3afb355;hb=0b27eb7deba6fd255fa284b1c691bb5a2998fc6d;hp=11f91d3f55e76d9b744498481e6330c4f3dd6fd0;hpb=ab3459c41088cd4d50f8e902c80f42094fe77e03;p=features.git diff --git a/src/main.cpp b/src/main.cpp index 11f91d3f55..65a9f4d8d7 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3,7 +3,7 @@ * This file is part of LyX, the document processor. * Licence details can be found in the file COPYING. * - * \author Lars Gullik Bjønnes + * \author Lars Gullik Bjønnes * \author Jean Marc Lasgouttes * * Full author contact details are available in file CREDITS. @@ -14,7 +14,6 @@ #include "LyX.h" #include "support/debug.h" -#include "support/gettext.h" #include "support/os.h" #include @@ -22,6 +21,11 @@ #include #endif +#ifdef WIN32 +#include +#endif + + using namespace std; @@ -31,15 +35,20 @@ int main(int argc, char * argv[]) ios_base::sync_with_stdio(false); #endif +#ifdef WIN32 + if (AttachConsole(ATTACH_PARENT_PROCESS)) { + freopen("CONOUT$", "w", stdout); + freopen("CONOUT$", "w", stderr); + } + SetConsoleOutputCP(CP_UTF8); +#endif + // To avoid ordering of global object problems with some // stdlibs we do the initialization here, but still as // early as possible. lyx::lyxerr.setStream(cerr); - lyx::support::os::init(argc, argv); - - // initialize for internationalized version *EK* - lyx::locale_init(); + lyx::support::os::init(argc, &argv); lyx::LyX the_lyx_instance;