!include defaults to UTF-8 after Unicode True
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6407 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
928f0f78e5
commit
6c283bde91
2 changed files with 10 additions and 0 deletions
|
@ -6,6 +6,10 @@ Released on ?
|
||||||
|
|
||||||
\S1{v3.0a2-cl} Changelog
|
\S1{v3.0a2-cl} Changelog
|
||||||
|
|
||||||
|
\S2{} Major Changes
|
||||||
|
|
||||||
|
\b !include defaults to UTF-8 after \cw{Unicode True}
|
||||||
|
|
||||||
\S2{} Minor Changes
|
\S2{} Minor Changes
|
||||||
|
|
||||||
\b FileRead in Unicode installers can handle DBCS, conversion output is limited to UCS-2.
|
\b FileRead in Unicode installers can handle DBCS, conversion output is limited to UCS-2.
|
||||||
|
|
|
@ -877,6 +877,12 @@ int CEXEBuild::includeScript(const TCHAR *f, NStreamEncoding&enc)
|
||||||
{
|
{
|
||||||
NIStream incstrm;
|
NIStream incstrm;
|
||||||
const bool openok = incstrm.OpenFileForReading(f,enc);
|
const bool openok = incstrm.OpenFileForReading(f,enc);
|
||||||
|
if ( // !include defaults to UTF-8 after "Unicode true"
|
||||||
|
NStreamEncoding::AUTO == enc.GetCodepage() && build_unicode &&
|
||||||
|
enc.GetPlatformDefaultCodepage() == incstrm.StreamEncoding().GetCodepage()
|
||||||
|
) incstrm.StreamEncoding().SetCodepage(NStreamEncoding::UTF8);
|
||||||
|
enc = incstrm.StreamEncoding();
|
||||||
|
|
||||||
TCHAR bufcpdisp[20];
|
TCHAR bufcpdisp[20];
|
||||||
incstrm.StreamEncoding().GetCPDisplayName(bufcpdisp);
|
incstrm.StreamEncoding().GetCPDisplayName(bufcpdisp);
|
||||||
SCRIPT_MSG(_T("!include: \"%s\" (%s)\n"),f,bufcpdisp);
|
SCRIPT_MSG(_T("!include: \"%s\" (%s)\n"),f,bufcpdisp);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue