aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lumina-fm/main.cpp6
1 files changed, 6 insertions, 0 deletions
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 <QtGui/QApplication>
#include <QDebug>
#include <QFile>
+#include <QTextCodec>
#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);
bgstack15