Also repair 'cout' and 'cerr' to not mangle UTF-8 strings.
This commit is contained in:
parent
8e63e2e4ec
commit
9f011cb572
@ -2684,17 +2684,17 @@
|
|||||||
<context>
|
<context>
|
||||||
<name>QApplication</name>
|
<name>QApplication</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/Global.cpp" line="681"/>
|
<location filename="../../src/Global.cpp" line="683"/>
|
||||||
<source>Executable '%1' doesn't support Windows compatibility mode.</source>
|
<source>Executable '%1' doesn't support Windows compatibility mode.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/Global.cpp" line="768"/>
|
<location filename="../../src/Global.cpp" line="770"/>
|
||||||
<source>Executable '%1' requires Qt v%2, but found Qt v%3.</source>
|
<source>Executable '%1' requires Qt v%2, but found Qt v%3.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/Global.cpp" line="777"/>
|
<location filename="../../src/Global.cpp" line="779"/>
|
||||||
<source>Executable '%1' requires Windows 2000 or later.</source>
|
<source>Executable '%1' requires Windows 2000 or later.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
#define VER_LAMEXP_MINOR_LO 3
|
#define VER_LAMEXP_MINOR_LO 3
|
||||||
#define VER_LAMEXP_TYPE Beta
|
#define VER_LAMEXP_TYPE Beta
|
||||||
#define VER_LAMEXP_PATCH 2
|
#define VER_LAMEXP_PATCH 2
|
||||||
#define VER_LAMEXP_BUILD 699
|
#define VER_LAMEXP_BUILD 700
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
// Tools versions
|
// Tools versions
|
||||||
|
@ -49,6 +49,8 @@
|
|||||||
#include "LockedFile.h"
|
#include "LockedFile.h"
|
||||||
|
|
||||||
//CRT includes
|
//CRT includes
|
||||||
|
#include <iostream>
|
||||||
|
#include <fstream>
|
||||||
#include <io.h>
|
#include <io.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <intrin.h>
|
#include <intrin.h>
|
||||||
@ -492,10 +494,10 @@ void lamexp_init_console(int argc, char* argv[])
|
|||||||
const int flags = _O_WRONLY | _O_U8TEXT;
|
const int flags = _O_WRONLY | _O_U8TEXT;
|
||||||
int hCrtStdOut = _open_osfhandle((intptr_t) GetStdHandle(STD_OUTPUT_HANDLE), flags);
|
int hCrtStdOut = _open_osfhandle((intptr_t) GetStdHandle(STD_OUTPUT_HANDLE), flags);
|
||||||
int hCrtStdErr = _open_osfhandle((intptr_t) GetStdHandle(STD_ERROR_HANDLE), flags);
|
int hCrtStdErr = _open_osfhandle((intptr_t) GetStdHandle(STD_ERROR_HANDLE), flags);
|
||||||
FILE *hfStdOut = (hCrtStdOut >= 0) ? _fdopen(hCrtStdOut, "w") : NULL;
|
FILE *hfStdOut = (hCrtStdOut >= 0) ? _fdopen(hCrtStdOut, "wb") : NULL;
|
||||||
FILE *hfStderr = (hCrtStdErr >= 0) ? _fdopen(hCrtStdErr, "w") : NULL;
|
FILE *hfStdErr = (hCrtStdErr >= 0) ? _fdopen(hCrtStdErr, "wb") : NULL;
|
||||||
if(hfStdOut) *stdout = *hfStdOut;
|
if(hfStdOut) { *stdout = *hfStdOut; std::cout.rdbuf(new std::filebuf(hfStdOut)); }
|
||||||
if(hfStderr) *stderr = *hfStderr;
|
if(hfStdErr) { *stderr = *hfStdErr; std::cerr.rdbuf(new std::filebuf(hfStdErr)); }
|
||||||
}
|
}
|
||||||
|
|
||||||
HWND hwndConsole = GetConsoleWindow();
|
HWND hwndConsole = GetConsoleWindow();
|
||||||
|
Loading…
Reference in New Issue
Block a user