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 ca68031795
commit ecf2e2da5a
No known key found for this signature in database
GPG key ID: 440FC65F2E0C6E01
4 changed files with 26 additions and 4 deletions

View file

@ -176,6 +176,8 @@ int main(int argc, char** argv)
return EXIT_FAILURE;
}
Utils::setDefaultTextStreams();
// Apply the configured theme before creating any GUI elements
app.applyTheme();
@ -196,9 +198,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) {
@ -232,5 +231,7 @@ int main(int argc, char** argv)
__lsan_disable();
#endif
Utils::resetTextStreams();
return exitCode;
}