diff --git a/src/GUI/Shared/Extensions/ProjectExtensions.cs b/src/GUI/Shared/Extensions/ProjectExtensions.cs index 419230088..c15c78a9b 100644 --- a/src/GUI/Shared/Extensions/ProjectExtensions.cs +++ b/src/GUI/Shared/Extensions/ProjectExtensions.cs @@ -4,6 +4,7 @@ using System.IO; using System.Linq; using System.Runtime.InteropServices; +using System.Text; using System.Threading.Tasks; using Community.VisualStudio.Toolkit; using EFCorePowerTools.Handlers.ReverseEngineer; @@ -266,7 +267,7 @@ public static async Task IsInstalledAsync(this Project project, NuGetPacka return false; } - public static List GenerateFiles(this Project project, List> result, string extension) + public static List GenerateFiles(this Project project, List> result, string extension, bool addToProject = false) { ThreadHelper.ThrowIfNotOnUIThread(); @@ -281,19 +282,28 @@ public static List GenerateFiles(this Project project, List GetOutputInternalAsync(string outputPath, string proj try { - File.WriteAllText(Path.Combine(Path.GetTempPath(), "efptparams.txt"), startInfo.Arguments); + File.WriteAllText(Path.Combine(Path.GetTempPath(), "efptparams.txt"), startInfo.Arguments, Encoding.UTF8); } catch { diff --git a/src/GUI/Shared/Handlers/ReverseEngineer/EfRevEngLauncher.cs b/src/GUI/Shared/Handlers/ReverseEngineer/EfRevEngLauncher.cs index 5bd88b710..a097b545b 100644 --- a/src/GUI/Shared/Handlers/ReverseEngineer/EfRevEngLauncher.cs +++ b/src/GUI/Shared/Handlers/ReverseEngineer/EfRevEngLauncher.cs @@ -5,6 +5,7 @@ using System.IO.Compression; using System.Linq; using System.Reflection; +using System.Text; using System.Threading.Tasks; using EFCorePowerTools.Extensions; using RevEng.Common; @@ -195,7 +196,7 @@ private async Task CreateStartInfoAsync(string arguments) private async Task GetOutputAsync() { var path = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName()) + ".json"; - File.WriteAllText(path, options.Write()); + File.WriteAllText(path, options.Write(), Encoding.UTF8); var launchPath = DropNetCoreFiles();