From 4c8ef11e9b3d220cad56cb027339c27c272e7c1e Mon Sep 17 00:00:00 2001 From: Simon Rozman Date: Fri, 19 Nov 2021 13:22:28 +0100 Subject: [PATCH] Resolve charset .idtx/.idt confusion NMake inline files are always created using ACP. The "1252" in the .idtx header has no effect on this. However, we must encode the .idt files using correct charset/codepage regardless the ACP being used on the building machine. Signed-off-by: Simon Rozman --- Core/Makefile | Bin 161268 -> 159916 bytes IDT.js | 6 +++--- MSI.wsf | 23 ++++++++++++----------- String.js | 35 ++++++++++++++++++++--------------- UI/Makefile | Bin 104782 -> 102426 bytes 5 files changed, 35 insertions(+), 29 deletions(-) diff --git a/Core/Makefile b/Core/Makefile index 51a4d6fe0b9aeaf135360342438158462207ef03..4c71572e7f990dea379df1226770c85187691a20 100644 GIT binary patch delta 320 zcmezJnsd!V&J7J5lV#YICfkV#Oy=OQ0MkAkIn&$JnfNAO5awf4oP1wceDV!W5oUh| z+vy*rnY1T!u!~G?;1HTFkj$jC`2)u#uE__4_@)&z>P=oCC^CJW6_efM1`#nvg~=Z| zB!Rj#CodG;+?*n|Jw=RhhT7yWiei)d6nM64*fLI1f$5yCmdw~T`4fi(O#O7RT*f)u z4N@6hF1*Cj>KsBSs^t=wnB2*h7I`X<1r!h`e$`jkJ(#y!w3)UbY t$7C@5OgEz#*lp7rq?yE~Ni(rv(_SXa)FTadRGuZ%3~Z_v*f51y0sx9dXg~k} delta 490 zcmZ4Ukn_uH&J7J5lRt0@O?Kc^n{33Ju{nfm5!d82P8nfa23rON1|^16hCGINhERrJ z2BqnZ4UD#vbwq@w*O@Xo02yM_w-qoNO}}Qy#5ehy$g;_sIJKrbNieOOe2iUe@(FgK z>0Zf|&Je#b<@>^bO)n1qdsEVPpdmD#BuTk0eu%G=9SZjG1(%H<&WzpqU60&%>FNk+J{) diff --git a/IDT.js b/IDT.js index d4851a2..65f82bc 100644 --- a/IDT.js +++ b/IDT.js @@ -93,7 +93,7 @@ function IDT(path) // Parse meta info var line = parseRow(dat.ReadText(adReadLine).split("\t")), i = 0; this.codepage = parseInt(line[i], 10); - if (isNaN(this.codepage)) this.codepage = 1252; else i++; + if (isNaN(this.codepage)) this.codepage = 0; else i++; this.table = line[i++]; this.key = line.slice(i); for (var i in this.key) { @@ -315,8 +315,8 @@ IDT.prototype.save = function(path) dat.WriteText(buildRow(this.columns).join("\t"), adWriteLine); dat.WriteText(buildRow(this.types ).join("\t"), adWriteLine); var meta = new Array(); - if (WScript.Arguments.Named.Exists("CP")) - meta.push(WScript.Arguments.Named("CP")); + if ("codepage" in this) + meta.push(this.codepage.toString(10)); meta.push(this.table); for (var key in this.key) meta.push(this.columns[this.key[key]]); diff --git a/MSI.wsf b/MSI.wsf index 5344f8c..4c2c8ac 100644 --- a/MSI.wsf +++ b/MSI.wsf @@ -568,7 +568,7 @@ Translate IDT file. - + @@ -577,7 +577,7 @@