From 73c00e37185d0754d24e7eaea96f1ba378658096 Mon Sep 17 00:00:00 2001 From: anders_k Date: Mon, 4 Jul 2016 12:23:58 +0000 Subject: [PATCH] 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 --- Docs/src/history.but | 2 ++ Source/script.cpp | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Docs/src/history.but b/Docs/src/history.but index dc5b39c2..a2b69b94 100644 --- a/Docs/src/history.but +++ b/Docs/src/history.but @@ -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}) diff --git a/Source/script.cpp b/Source/script.cpp index a353ef57..2a9a5149 100644 --- a/Source/script.cpp +++ b/Source/script.cpp @@ -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();