UTF-8 support for mission map descriptions
authorWuzzy <almikes@aol.com>
Thu, 17 Nov 2016 03:35:58 +0100
changeset 11900 d71448338ac2
parent 11899 0b6baf802b3d
child 11901 291d53985dcd
UTF-8 support for mission map descriptions
QTfrontend/model/MapModel.cpp
share/hedgewars/Data/Maps/Basketball/desc.txt
share/hedgewars/Data/Maps/Control/desc.txt
share/hedgewars/Data/Maps/Knockball/desc.txt
--- a/QTfrontend/model/MapModel.cpp	Thu Nov 17 03:35:10 2016 +0100
+++ b/QTfrontend/model/MapModel.cpp	Thu Nov 17 03:35:58 2016 +0100
@@ -120,13 +120,13 @@
             if (isMission)
             {
                 // get locale
-                DataManager & dataMgr = DataManager::instance();
-                QSettings settings(dataMgr.settingsFileName(), QSettings::IniFormat);
+                QSettings settings(datamgr.settingsFileName(), QSettings::IniFormat);
                 QString locale = settings.value("misc/locale", "").toString();
                 if (locale.isEmpty())
                     locale = QLocale::system().name();
 
                 QSettings descSettings(QString("physfs://Maps/%1/desc.txt").arg(map), QSettings::IniFormat);
+                descSettings.setIniCodec("UTF-8");
                 desc = descSettings.value(locale, QString()).toString().replace("|", "\n").replace("\\,", ",");
             }
 
--- a/share/hedgewars/Data/Maps/Basketball/desc.txt	Thu Nov 17 03:35:10 2016 +0100
+++ b/share/hedgewars/Data/Maps/Basketball/desc.txt	Thu Nov 17 03:35:58 2016 +0100
@@ -1,2 +1,2 @@
 en=Bat your opponents through the hoops.
-de=Schlag deine Gegner durch die Koerbe.
+de=Schlag deine Gegner durch die Körbe.
--- a/share/hedgewars/Data/Maps/Control/desc.txt	Thu Nov 17 03:35:10 2016 +0100
+++ b/share/hedgewars/Data/Maps/Control/desc.txt	Thu Nov 17 03:35:58 2016 +0100
@@ -1,2 +1,2 @@
 en=Stand on the pillars as long as you can.
-de=Steh auf den Saeulen so lange du kannst.
+de=Steh auf den Säulen so lange du kannst.
--- a/share/hedgewars/Data/Maps/Knockball/desc.txt	Thu Nov 17 03:35:10 2016 +0100
+++ b/share/hedgewars/Data/Maps/Knockball/desc.txt	Thu Nov 17 03:35:58 2016 +0100
@@ -1,2 +1,2 @@
 en=Knock your opponents off the platforms using only a bat!
-de=Schubs deine Gegner von den Plattformen nur mit einem Baseball-Schlaeger!
+de=Schubs deine Gegner von den Plattformen nur mit einem Baseball-Schläger!