diff --git a/src/logger.cpp b/src/logger.cpp index bd6236549..5e563d59d 100644 --- a/src/logger.cpp +++ b/src/logger.cpp @@ -187,8 +187,11 @@ void Logger::setCurrentLogFile(QString filename) } instance->outFileStream.setDevice(&instance->outputFile); #if defined(Q_OS_WIN) - // instance->outFileStream.setCodec("UTF-8"); // to properly print special characters in files + #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) instance->outFileStream.setEncoding(QStringConverter::Utf8); + #else + instance->outFileStream.setCodec("UTF-8"); // to properly print special characters in files + #endif #endif instance->setCurrentStream(&instance->outFileStream); }