mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-16 18:50:46 +00:00
Mark exported journal backup file as UTF-8.
This commit is contained in:
parent
a06d37e10e
commit
7bf8470d36
@ -214,6 +214,7 @@ void BackupJournal(QString filename)
|
|||||||
stream.setAutoFormattingIndent(2);
|
stream.setAutoFormattingIndent(2);
|
||||||
|
|
||||||
stream.writeStartDocument();
|
stream.writeStartDocument();
|
||||||
|
// stream.writeProcessingInstruction("xml", "version=\"1.0\" encoding=\"UTF-8\"");
|
||||||
stream.writeStartElement("OSCAR");
|
stream.writeStartElement("OSCAR");
|
||||||
stream.writeStartElement("Journal");
|
stream.writeStartElement("Journal");
|
||||||
stream.writeAttribute("username", p_profile->user->userName());
|
stream.writeAttribute("username", p_profile->user->userName());
|
||||||
@ -301,6 +302,8 @@ void BackupJournal(QString filename)
|
|||||||
}
|
}
|
||||||
|
|
||||||
QTextStream ts(&file);
|
QTextStream ts(&file);
|
||||||
|
ts.setCodec("UTF-8");
|
||||||
|
ts.setGenerateByteOrderMark(true);
|
||||||
ts << outBuf;
|
ts << outBuf;
|
||||||
file.close();
|
file.close();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user