C#: Always decode dotnet
output as UTF-8
This commit is contained in:
parent
0a0132ccf4
commit
e0efa3c357
@ -41,6 +41,12 @@ namespace GodotTools.Build
|
||||
startInfo.EnvironmentVariables["DOTNET_CLI_UI_LANGUAGE"]
|
||||
= ((string)editorSettings.GetSetting("interface/editor/editor_language")).Replace('_', '-');
|
||||
|
||||
if (OperatingSystem.IsWindows())
|
||||
{
|
||||
startInfo.StandardOutputEncoding = Encoding.UTF8;
|
||||
startInfo.StandardErrorEncoding = Encoding.UTF8;
|
||||
}
|
||||
|
||||
// Needed when running from Developer Command Prompt for VS
|
||||
RemovePlatformVariable(startInfo.EnvironmentVariables);
|
||||
|
||||
@ -105,6 +111,12 @@ namespace GodotTools.Build
|
||||
startInfo.EnvironmentVariables["DOTNET_CLI_UI_LANGUAGE"]
|
||||
= ((string)editorSettings.GetSetting("interface/editor/editor_language")).Replace('_', '-');
|
||||
|
||||
if (OperatingSystem.IsWindows())
|
||||
{
|
||||
startInfo.StandardOutputEncoding = Encoding.UTF8;
|
||||
startInfo.StandardErrorEncoding = Encoding.UTF8;
|
||||
}
|
||||
|
||||
// Needed when running from Developer Command Prompt for VS
|
||||
RemovePlatformVariable(startInfo.EnvironmentVariables);
|
||||
|
||||
|
@ -4,6 +4,7 @@ using System.Diagnostics;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using JetBrains.Annotations;
|
||||
using OS = GodotTools.Utils.OS;
|
||||
|
||||
@ -58,6 +59,11 @@ namespace GodotTools.Build
|
||||
RedirectStandardOutput = true
|
||||
};
|
||||
|
||||
if (OperatingSystem.IsWindows())
|
||||
{
|
||||
process.StartInfo.StandardOutputEncoding = Encoding.UTF8;
|
||||
}
|
||||
|
||||
process.StartInfo.EnvironmentVariables["DOTNET_CLI_UI_LANGUAGE"] = "en-US";
|
||||
|
||||
var lines = new List<string>();
|
||||
|
Loading…
Reference in New Issue
Block a user