From ad417c2c3c4fbca9a407b319f1cc8af8ad7ad5fc Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Mon, 8 Sep 2014 10:47:03 -0400 Subject: Make sure that the translation codec is set to the text codec for the current locale in lumina-fm. --- lumina-fm/main.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lumina-fm/main.cpp b/lumina-fm/main.cpp index 1315ff79..d15a81d3 100644 --- a/lumina-fm/main.cpp +++ b/lumina-fm/main.cpp @@ -7,6 +7,7 @@ #include #include #include +#include #include "MainUI.h" @@ -30,6 +31,7 @@ int main(int argc, char ** argv) } #endif a.setApplicationName("Insight File Manager"); + //Load current Locale QTranslator translator; QLocale mylocale; QString langCode = mylocale.name(); @@ -39,6 +41,10 @@ int main(int argc, char ** argv) a.installTranslator( &translator ); qDebug() << "Locale:" << langCode; + //Load current encoding for this locale + QTextCodec::setCodecForTr( QTextCodec::codecForLocale() ); //make sure to use the same codec + qDebug() << "Locale Encoding:" << QTextCodec::codecForLocale()->name(); + MainUI w; QObject::connect(&a, SIGNAL(messageReceived(const QString&)), &w, SLOT(slotSingleInstance(const QString&)) ); w.OpenDirs(in); -- cgit