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>
|
||||
<name>QApplication</name>
|
||||
<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>
|
||||
<translation type="unfinished"></translation>
|
||||
</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>
|
||||
<translation type="unfinished"></translation>
|
||||
</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>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -30,7 +30,7 @@
|
||||
#define VER_LAMEXP_MINOR_LO 3
|
||||
#define VER_LAMEXP_TYPE Beta
|
||||
#define VER_LAMEXP_PATCH 2
|
||||
#define VER_LAMEXP_BUILD 699
|
||||
#define VER_LAMEXP_BUILD 700
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Tools versions
|
||||
|
@ -49,6 +49,8 @@
|
||||
#include "LockedFile.h"
|
||||
|
||||
//CRT includes
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <io.h>
|
||||
#include <fcntl.h>
|
||||
#include <intrin.h>
|
||||
@ -492,10 +494,10 @@ void lamexp_init_console(int argc, char* argv[])
|
||||
const int flags = _O_WRONLY | _O_U8TEXT;
|
||||
int hCrtStdOut = _open_osfhandle((intptr_t) GetStdHandle(STD_OUTPUT_HANDLE), flags);
|
||||
int hCrtStdErr = _open_osfhandle((intptr_t) GetStdHandle(STD_ERROR_HANDLE), flags);
|
||||
FILE *hfStdOut = (hCrtStdOut >= 0) ? _fdopen(hCrtStdOut, "w") : NULL;
|
||||
FILE *hfStderr = (hCrtStdErr >= 0) ? _fdopen(hCrtStdErr, "w") : NULL;
|
||||
if(hfStdOut) *stdout = *hfStdOut;
|
||||
if(hfStderr) *stderr = *hfStderr;
|
||||
FILE *hfStdOut = (hCrtStdOut >= 0) ? _fdopen(hCrtStdOut, "wb") : NULL;
|
||||
FILE *hfStdErr = (hCrtStdErr >= 0) ? _fdopen(hCrtStdErr, "wb") : NULL;
|
||||
if(hfStdOut) { *stdout = *hfStdOut; std::cout.rdbuf(new std::filebuf(hfStdOut)); }
|
||||
if(hfStdErr) { *stderr = *hfStdErr; std::cerr.rdbuf(new std::filebuf(hfStdErr)); }
|
||||
}
|
||||
|
||||
HWND hwndConsole = GetConsoleWindow();
|
||||
|
Loading…
Reference in New Issue
Block a user