Skip to content

Commit

Permalink
Enforce UTF-8 encoding for saved file
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxFleur committed Dec 9, 2021
1 parent 189064e commit ece9061
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/handler/FileHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ FileHandler::saveTable(QTableWidget *tableWidget, QString filename, int rowEnter
// Check if device is open for writing
if (file.open(QFile::WriteOnly | QFile::Truncate)) {
QTextStream data(&file);
data.setCodec("UTF-8");
data.setGenerateByteOrderMark(false);

QStringList strList;

// Store the header of the table, used for checking the correct table format if the table is reloaded
Expand Down

0 comments on commit ece9061

Please sign in to comment.