From 18d2e5f1552365d0741a0508c1343668f6e9d0cd Mon Sep 17 00:00:00 2001 From: Martchus Date: Mon, 6 Jun 2016 20:29:12 +0200 Subject: [PATCH] Ensure file info is always UTF-8 encoded --- gui/mainwindow.cpp | 2 ++ translations/tageditor_de_DE.ts | 22 +++++++++++----------- translations/tageditor_en_US.ts | 22 +++++++++++----------- 3 files changed, 24 insertions(+), 22 deletions(-) diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index b94d987..9906f85 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #include @@ -467,6 +468,7 @@ void MainWindow::saveFileInformation() QFile file(path); if(file.open(QIODevice::WriteOnly | QIODevice::Truncate)) { QTextStream stream(&file); + stream.setCodec(QTextCodec::codecForName("UTF-8")); stream << htmlData; file.close(); if(file.error() != QFileDevice::NoError) { diff --git a/translations/tageditor_de_DE.ts b/translations/tageditor_de_DE.ts index d8e516a..1620c78 100644 --- a/translations/tageditor_de_DE.ts +++ b/translations/tageditor_de_DE.ts @@ -1865,58 +1865,58 @@ another position would prevent rewriting the entire file - + No file opened. - + A tag editing utility supporting ID3, MP4 (iTunes style), Vorbis and Matroska tags. - + Unable to show the next file because it can't be found anymore. - + Open file - - + Save changes as - - + Save file information - - + Unable to write to file. %1 - + Unable to open file. - + No file information available. - + No file is opened. - + Unable to save file information because the current process hasn't been finished yet. diff --git a/translations/tageditor_en_US.ts b/translations/tageditor_en_US.ts index 5cdd60c..0b7225e 100644 --- a/translations/tageditor_en_US.ts +++ b/translations/tageditor_en_US.ts @@ -1865,58 +1865,58 @@ another position would prevent rewriting the entire file - + No file opened. - + A tag editing utility supporting ID3, MP4 (iTunes style), Vorbis and Matroska tags. - + Unable to show the next file because it can't be found anymore. - + Open file - - + Save changes as - - + Save file information - - + Unable to write to file. %1 - + Unable to open file. - + No file information available. - + No file is opened. - + Unable to save file information because the current process hasn't been finished yet.