1
0
mirror of https://gitlab.com/pholy/OSCAR-code.git synced 2025-04-15 18:20:46 +00:00

Mark exported journal backup file as UTF-8.

This commit is contained in:
Guy Scharf 2021-01-18 21:55:14 -07:00
parent a06d37e10e
commit 7bf8470d36

View File

@ -214,6 +214,7 @@ void BackupJournal(QString filename)
stream.setAutoFormattingIndent(2);
stream.writeStartDocument();
// stream.writeProcessingInstruction("xml", "version=\"1.0\" encoding=\"UTF-8\"");
stream.writeStartElement("OSCAR");
stream.writeStartElement("Journal");
stream.writeAttribute("username", p_profile->user->userName());
@ -301,6 +302,8 @@ void BackupJournal(QString filename)
}
QTextStream ts(&file);
ts.setCodec("UTF-8");
ts.setGenerateByteOrderMark(true);
ts << outBuf;
file.close();
}