Skip to content

Commit

Permalink
- #1736: Issue with Special Characters in WixSharp Bootstrapper Custo…
Browse files Browse the repository at this point in the history
…m BA after Upgrading from Wix3 to Wix4
  • Loading branch information
oleg-shilo committed Feb 1, 2025
1 parent 550863f commit a1ba08a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
4 changes: 3 additions & 1 deletion Source/src/WixSharp/Compiler.Bootstrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ THE SOFTWARE.
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
Expand All @@ -40,6 +41,7 @@ THE SOFTWARE.
using WixSharp.Bootstrapper;
using WixSharp.CommonTasks;
using WixToolset.Dtf.WindowsInstaller;

using IO = System.IO;

namespace WixSharp
Expand Down Expand Up @@ -272,7 +274,7 @@ public static string BuildWxs(Bundle project)
if (WixSourceFormated != null)
WixSourceFormated(ref xml);

using (var sw = new IO.StreamWriter(file, false, Encoding.Default))
using (var sw = new IO.StreamWriter(file, false, project.Encoding))
sw.WriteLine(xml);

Compiler.OutputWriteLine("\n----------------------------------------------------------\n");
Expand Down
6 changes: 0 additions & 6 deletions Source/src/WixSharp/Project.cs
Original file line number Diff line number Diff line change
Expand Up @@ -322,12 +322,6 @@ internal virtual void Preprocess()
/// </summary>
public string LicenceFile = "";

/// <summary>
/// The Encoding to be used for MSI UI dialogs. If not specified the
/// <c>System.Text.Encoding.UTF8</c> will be used.
/// </summary>
public Encoding Encoding = Encoding.UTF8;

/// <summary>
/// Type of the MSI User Interface. This value is assigned to the <c>UIRef</c> WiX element during the compilation.
/// If not specified <see cref="WUI.WixUI_Minimal"/> will used.
Expand Down
7 changes: 7 additions & 0 deletions Source/src/WixSharp/WixProject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading;
using System.Xml.Linq;

Expand Down Expand Up @@ -170,6 +171,12 @@ public string Language
}
}

/// <summary>
/// The Encoding to be used for generating WSX. If not specified the
/// <c>System.Text.Encoding.UTF8</c> will be used.
/// </summary>
public Encoding Encoding = Encoding.UTF8;

/// <summary>
/// WiX linker <c>Light.exe</c> options (e.g. "-sice:ICE30 -sw1076" (disable warning 1076 and ICE warning 30).
/// </summary>
Expand Down

0 comments on commit a1ba08a

Please sign in to comment.