From def047af9d5634f8f9f2dc775d42c11da096765d Mon Sep 17 00:00:00 2001 From: Michael Hansen Date: Sat, 9 Sep 2023 17:10:42 -0500 Subject: [PATCH] Set UTF-8 console for Windows --- src/cpp/main.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/cpp/main.cpp b/src/cpp/main.cpp index 3c6192e..962ca47 100644 --- a/src/cpp/main.cpp +++ b/src/cpp/main.cpp @@ -95,6 +95,11 @@ int main(int argc, char *argv[]) { RunConfig runConfig; parseArgs(argc, argv, runConfig); +#ifdef _WIN32 + // Required on Windows to show IPA symbols + SetConsoleOutputCP(CP_UTF8); +#endif + piper::PiperConfig piperConfig; piper::Voice voice;