diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2021-08-01 13:11:51 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2021-08-01 13:11:51 -0400 |
commit | 5b31be76dd90711ff475341de8dfdb6e1f50b98a (patch) | |
tree | e120bc62af72e94e8e924ba124382d0c6f9304de /src/SMAPI/Framework/Logging | |
parent | 8f96a97f070d654764de3b138678d8f62707f485 (diff) | |
parent | d688cdf8c3c852d4b11cdd046d67c4b35443cc95 (diff) | |
download | SMAPI-5b31be76dd90711ff475341de8dfdb6e1f50b98a.tar.gz SMAPI-5b31be76dd90711ff475341de8dfdb6e1f50b98a.tar.bz2 SMAPI-5b31be76dd90711ff475341de8dfdb6e1f50b98a.zip |
Merge branch 'develop' into stable
Diffstat (limited to 'src/SMAPI/Framework/Logging')
-rw-r--r-- | src/SMAPI/Framework/Logging/LogManager.cs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/SMAPI/Framework/Logging/LogManager.cs b/src/SMAPI/Framework/Logging/LogManager.cs index a4df3c18..a3d4f23d 100644 --- a/src/SMAPI/Framework/Logging/LogManager.cs +++ b/src/SMAPI/Framework/Logging/LogManager.cs @@ -3,11 +3,13 @@ using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.IO; using System.Linq; +using System.Text; using System.Text.RegularExpressions; using System.Threading; using StardewModdingAPI.Framework.Commands; using StardewModdingAPI.Framework.Models; using StardewModdingAPI.Framework.ModLoading; +using StardewModdingAPI.Internal; using StardewModdingAPI.Internal.ConsoleWriting; using StardewModdingAPI.Toolkit.Framework.ModData; using StardewModdingAPI.Toolkit.Utilities; @@ -106,6 +108,10 @@ namespace StardewModdingAPI.Framework.Logging if (writeToConsole) output.OnMessageIntercepted += message => this.HandleConsoleMessage(this.MonitorForGame, message); Console.SetOut(output); + + // enable Unicode handling + Console.InputEncoding = Encoding.Unicode; + Console.OutputEncoding = Encoding.Unicode; } /// <summary>Get a monitor instance derived from SMAPI's current settings.</summary> @@ -258,7 +264,7 @@ namespace StardewModdingAPI.Framework.Logging break; // path too long exception - case PathTooLongException: + case PathTooLongException _: { string[] affectedPaths = PathUtilities.GetTooLongPaths(Constants.ModsPath).ToArray(); string message = affectedPaths.Any() |