diff options
Diffstat (limited to 'src/cli/Utils.cpp')
-rw-r--r-- | src/cli/Utils.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/cli/Utils.cpp b/src/cli/Utils.cpp index 6c0b73e93..d8134de26 100644 --- a/src/cli/Utils.cpp +++ b/src/cli/Utils.cpp @@ -63,6 +63,13 @@ namespace Utils fd->open(fopen("/dev/null", "w"), QIODevice::WriteOnly); #endif DEVNULL.setDevice(fd); + +#ifdef Q_OS_WIN + // On Windows, we ask via keepassxc-cli.exe.manifest to use UTF-8, + // but the console code-page isn't automatically changed to match. + SetConsoleCP(GetACP()); + SetConsoleOutputCP(GetACP()); +#endif } void setStdinEcho(bool enable = true) |