summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/release-notes.md1
-rw-r--r--src/SMAPI/Framework/Logging/LogManager.cs5
2 files changed, 5 insertions, 1 deletions
diff --git a/docs/release-notes.md b/docs/release-notes.md
index a00c73da..79129024 100644
--- a/docs/release-notes.md
+++ b/docs/release-notes.md
@@ -4,6 +4,7 @@
## Upcoming release
* For players:
* Added friendly error in 64-bit mode when a mod is 32-bit only.
+ * Fixed console encoding issues on Linux/macOS.
* Fixed some installer errors now show info header.
* For mod authors:
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>