changeset 832:170b13ea05ee

(Issue10) Force encoding to be latin-1 during installer creation.
author Andre Heinecke <andre.heinecke@intevation.de>
date Thu, 24 Jul 2014 16:30:10 +0200
parents 747a48996c1f
children e1bb60a8129b
files packaging/tmp-createpackage.sh.in ui/administrator.cpp
diffstat 2 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/packaging/tmp-createpackage.sh.in	Thu Jul 24 15:59:00 2014 +0200
+++ b/packaging/tmp-createpackage.sh.in	Thu Jul 24 16:30:10 2014 +0200
@@ -29,6 +29,6 @@
     -Dproductname="TrustBridge" \
     -Dpath_sep="/" \
     -Dinfo_url="https://wald.intevation.org/projects/trustbridge/" \
-    -dsize=$EST_SIZE \
+    -Dsize=$EST_SIZE \
     -Dproductname_short="TrustBridge" @CMAKE_SOURCE_DIR@/packaging/trustbridge.nsi
 rm -r $TMPDIR
--- a/ui/administrator.cpp	Thu Jul 24 15:59:00 2014 +0200
+++ b/ui/administrator.cpp	Thu Jul 24 16:30:10 2014 +0200
@@ -13,6 +13,7 @@
 #include <QSettings>
 #include <QTranslator>
 #include <QDebug>
+#include <QTextCodec>
 
 #ifndef VERSION
 #define VERSION "0.0.1"
@@ -66,6 +67,10 @@
     }
     app.installTranslator(&translator);
 
+    /* Out of process calls need to be encoded in latin-1 so that they
+     * look decent on western europe's windows */
+    QTextCodec::setCodecForLocale(QTextCodec::codecForName ("ISO-8859-1"));
+
     AdministratorWindow adminWin;
     adminWin.show();
 

http://wald.intevation.org/projects/trustbridge/