summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2021-08-25 18:26:02 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2021-08-25 18:26:02 -0400
commit911843e1beb72a3fc0337a697f732215b66304c0 (patch)
treefd3dc5d5c58f8f54d1ef1cd0a94af6ebe82766e3 /src/SMAPI/Framework
parentf8c76bde39ba2afb11540c9af5d88aad4c73f789 (diff)
downloadSMAPI-911843e1beb72a3fc0337a697f732215b66304c0.tar.gz
SMAPI-911843e1beb72a3fc0337a697f732215b66304c0.tar.bz2
SMAPI-911843e1beb72a3fc0337a697f732215b66304c0.zip
fix console encoding issues (#798)
Diffstat (limited to 'src/SMAPI/Framework')
-rw-r--r--src/SMAPI/Framework/Logging/LogManager.cs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/SMAPI/Framework/Logging/LogManager.cs b/src/SMAPI/Framework/Logging/LogManager.cs
index 7f1b76e7..c6faa90d 100644
--- a/src/SMAPI/Framework/Logging/LogManager.cs
+++ b/src/SMAPI/Framework/Logging/LogManager.cs
@@ -109,9 +109,12 @@ namespace StardewModdingAPI.Framework.Logging
output.OnMessageIntercepted += message => this.HandleConsoleMessage(this.MonitorForGame, message);
Console.SetOut(output);
- // enable Unicode handling
+ // enable Unicode handling on Windows
+ // (the terminal defaults to UTF-8 on Linux/macOS)
+#if SMAPI_FOR_WINDOWS
Console.InputEncoding = Encoding.Unicode;
Console.OutputEncoding = Encoding.Unicode;
+#endif
}
/// <summary>Get a monitor instance derived from SMAPI's current settings.</summary>