Skip to content

Commit

Permalink
C#: Use BOM when creating a solution
Browse files Browse the repository at this point in the history
At least on Windows there seems to be issues if
the solution has no BOM and contains a project
with cyrillic chars.

(cherry picked from commit 1c74fa4)
  • Loading branch information
neikeq authored and akien-mga committed Sep 8, 2020
1 parent 93c15c2 commit 8c5ed68
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;

namespace GodotTools.ProjectEditor
Expand Down Expand Up @@ -88,7 +89,7 @@ public void Save()
string solutionPath = Path.Combine(DirectoryPath, Name + ".sln");
string content = string.Format(SolutionTemplate, projectsDecl, slnPlatformsCfg, projPlatformsCfg);

File.WriteAllText(solutionPath, content);
File.WriteAllText(solutionPath, content, Encoding.UTF8); // UTF-8 with BOM
}

public DotNetSolution(string name)
Expand Down

0 comments on commit 8c5ed68

Please sign in to comment.