diff options
| author | RedworkDE <10944644+RedworkDE@users.noreply.github.com> | 2023-02-27 15:11:51 +0100 |
|---|---|---|
| committer | RedworkDE <10944644+RedworkDE@users.noreply.github.com> | 2023-06-07 10:58:34 +0200 |
| commit | e0efa3c3577795d5b5dbeef6e35b9fd74e61aa3d (patch) | |
| tree | 65a83e730a1a49d37c87c70a847257d2886d8559 | |
| parent | 0a0132ccf40b14d2ca8987193b3b07a5fe03a674 (diff) | |
| download | redot-engine-e0efa3c3577795d5b5dbeef6e35b9fd74e61aa3d.tar.gz | |
C#: Always decode `dotnet` output as UTF-8
| -rw-r--r-- | modules/mono/editor/GodotTools/GodotTools/Build/BuildSystem.cs | 12 | ||||
| -rw-r--r-- | modules/mono/editor/GodotTools/GodotTools/Build/DotNetFinder.cs | 6 |
2 files changed, 18 insertions, 0 deletions
diff --git a/modules/mono/editor/GodotTools/GodotTools/Build/BuildSystem.cs b/modules/mono/editor/GodotTools/GodotTools/Build/BuildSystem.cs index d550c36b82..d7d484d166 100644 --- a/modules/mono/editor/GodotTools/GodotTools/Build/BuildSystem.cs +++ b/modules/mono/editor/GodotTools/GodotTools/Build/BuildSystem.cs @@ -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); diff --git a/modules/mono/editor/GodotTools/GodotTools/Build/DotNetFinder.cs b/modules/mono/editor/GodotTools/GodotTools/Build/DotNetFinder.cs index b437c7e742..cfe79cf3e1 100644 --- a/modules/mono/editor/GodotTools/GodotTools/Build/DotNetFinder.cs +++ b/modules/mono/editor/GodotTools/GodotTools/Build/DotNetFinder.cs @@ -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>(); |
