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:
anders_k 2010-11-15 15:40:13 +00:00
parent 2ef166a970
commit 23f598b49f

View file

@ -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
{