Win32 only
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6129 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
2ef166a970
commit
23f598b49f
1 changed files with 4 additions and 0 deletions
|
@ -57,9 +57,11 @@ static void myatexit()
|
|||
{
|
||||
dopause();
|
||||
if (g_output != stdout && g_output) fclose(g_output);
|
||||
#ifdef _WIN32
|
||||
#ifdef _UNICODE
|
||||
SetConsoleOutputCP(g_initialCodepage);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
static void sigint(int sig)
|
||||
|
@ -279,8 +281,10 @@ int _tmain(int argc, TCHAR **argv)
|
|||
|
||||
#ifdef _UNICODE
|
||||
_setmode(_fileno(stdout), _O_U8TEXT); // set stdout to UTF-8
|
||||
#ifdef _WIN32
|
||||
g_initialCodepage = GetConsoleOutputCP();
|
||||
SetConsoleOutputCP(CP_UTF8); // set console output to UTF-8 (especially useful for subprocesses like !system)
|
||||
#endif
|
||||
#endif
|
||||
try
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue