Save log file in UTF-8 encoding

Otherwise it uses sytem defaults: usually UTF-8 on Linux and local 8-bit
encoding on Windows.
This commit is contained in:
Chocobo1 2020-03-26 15:50:07 +08:00
parent d179c6d5a1
commit 12396a7582
No known key found for this signature in database
GPG key ID: 210D9C873253A68C

View file

@ -115,6 +115,7 @@ void FileLogger::addLogMessage(const Log::Msg &msg)
if (!m_logFile.isOpen()) return;
QTextStream stream(&m_logFile);
stream.setCodec("UTF-8");
switch (msg.type) {
case Log::INFO: