Fixed bug #1147: !makensis command must force Unicode output to be UTF-8

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6762 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
anders_k 2016-07-04 12:23:58 +00:00
parent cb95a4a23b
commit 73c00e3718
2 changed files with 5 additions and 1 deletions

View file

@ -10,6 +10,8 @@ Released on ???? ?nd, 2016
\b Fixed LogicLib nested $\{Select\} bug
\b \R{makensis}{!makensis} command must force Unicode output to be UTF-8 (\W{http://sf.net/p/nsis/bugs/1147}{bug #1147})
\S2{} Minor Changes
\b Zip2Exe aborts if the zip file is encrypted (\W{http://sf.net/p/nsis/bugs/1141}{bug #1141})

View file

@ -3213,7 +3213,9 @@ int CEXEBuild::doCommand(int which_token, LineParser &line)
compile+= _T(" ") OPT_STR _T("v"), wsprintf(buf,_T("%d"),get_verbosity()), compile+=buf;
#ifdef _WIN32 // POSIX does not support -OUTPUTCHARSET
extern NStreamEncoding g_outputenc;
compile+= _T(" ") OPT_STR _T("OCS "), g_outputenc.GetCPDisplayName(buf), compile+=buf;
NStreamEncoding childenc=g_outputenc;
if (childenc.IsUnicode()) childenc.SetCodepage(NStreamEncoding::UTF8); // UTF-8 is the only Unicode encoding supported by RunChildProcessRedirected
compile+= _T(" ") OPT_STR _T("OCS "), childenc.GetCPDisplayName(buf), compile+=buf;
#endif
if (*exec) compile+= _T(" "), compile+=exec;
exec=compile.c_str();