CLI: Restore the original codepage on windows

* Fixes #11465
This commit is contained in:
Jonathan White 2024-11-13 17:50:45 -05:00
parent 9a63e80386
commit b1180b3341
4 changed files with 26 additions and 4 deletions

View file

@ -174,6 +174,8 @@ int main(int argc, char** argv)
return EXIT_FAILURE;
}
Utils::setDefaultTextStreams();
// Apply the configured theme before creating any GUI elements
app.applyTheme();
@ -192,9 +194,6 @@ int main(int argc, char** argv)
mainWindow.setAllowScreenCapture(parser.isSet(allowScreenCaptureOption));
const bool pwstdin = parser.isSet(pwstdinOption);
if (!fileNames.isEmpty() && pwstdin) {
Utils::setDefaultTextStreams();
}
for (const QString& filename : fileNames) {
QString password;
if (pwstdin) {
@ -228,5 +227,7 @@ int main(int argc, char** argv)
__lsan_disable();
#endif
Utils::resetTextStreams();
return exitCode;
}