summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-03-28 08:18:44 -0700
committerThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-04-08 16:29:46 +0200
commitdc99410902b9eade9e408389e49f09d5163b6caf (patch)
tree92ff1f2c67ed031f34c5c081e778bce1d70f1f21
parent2e9261416474666d0305419aae5713e6408ef1c7 (diff)
downloadmana-dc99410902b9eade9e408389e49f09d5163b6caf.tar.gz
mana-dc99410902b9eade9e408389e49f09d5163b6caf.tar.bz2
mana-dc99410902b9eade9e408389e49f09d5163b6caf.tar.xz
mana-dc99410902b9eade9e408389e49f09d5163b6caf.zip
Enable UTF-8 support on Windows
This relies on Windows 10 version 1803 (10.0.17134.0), which is hopefully an acceptable minimum. It fixes handling of paths with special characters.
-rw-r--r--src/main.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 9b29eba4..7b9e921e 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -205,6 +205,9 @@ int main(int argc, char *argv[])
// Load mingw crash handler. Won't fail if dll is not present.
LoadLibrary("exchndl.dll");
#endif
+#ifdef _WIN32
+ setlocale(LC_ALL, ".UTF8");
+#endif
// Parse command line options
Client::Options options;