Add missing LocaleGuard to prevent commas getting into config files.
authorCarl Hetherington <cth@carlh.net>
Mon, 28 Oct 2013 12:17:08 +0000 (12:17 +0000)
committerCarl Hetherington <cth@carlh.net>
Mon, 28 Oct 2013 12:17:08 +0000 (12:17 +0000)
ChangeLog
run/dcpomatic
src/lib/config.cc

index c605245d1c7fd82346576e3c1936f8376b92947b..f7a2689ddf0081ff9c3789d77c5e11e5bd3dcaff 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-10-28  Carl Hetherington  <cth@carlh.net>
+
+       * Fix failure to reload configuration on
+       some non-English locales.
+
 2013-10-26  Carl Hetherington  <cth@carlh.net>
 
        * Version 1.23 released.
index cf3de165c11044471040a93eb3ec240ea6a33156..d79266d3a1337db0b2c4d0b60c6e59c5fd791952 100755 (executable)
@@ -12,7 +12,7 @@ elif [ "$1" == "--callgrind" ]; then
     valgrind --tool="callgrind" build/src/tools/dcpomatic $*
 elif [ "$1" == "--i18n" ]; then
     shift
-    LANGUAGE=fr_FR.UTF8 LANG=fr_FR.UTF8 build/src/tools/dcpomatic "$*"
+    LANGUAGE=fr_FR.UTF8 LANG=fr_FR.UTF8 LC_ALL=fr_FR.UTF8 build/src/tools/dcpomatic "$*"
 else
     build/src/tools/dcpomatic $*
 fi
index 0b1b99e227d74d275a2efd3527222377a7f2ed04..0c6aed4a81455530b885c2c2efeaf6ffa9622c3f 100644 (file)
@@ -33,6 +33,7 @@
 #include "sound_processor.h"
 #include "colour_conversion.h"
 #include "cinema.h"
+#include "util.h"
 
 #include "i18n.h"
 
@@ -79,6 +80,8 @@ Config::Config ()
 void
 Config::read ()
 {
+       LocaleGuard lg;
+       
        if (!boost::filesystem::exists (file (false))) {
                read_old_metadata ();
                return;
@@ -263,7 +266,7 @@ Config::instance ()
                        /* configuration load failed; never mind, just
                           stick with the default.
                        */
-                       cerr << "dcpomatic: failed to load configuration (" << e.what() << "\n";
+                       cerr << "dcpomatic: failed to load configuration (" << e.what() << ")\n";
                } catch (...) {
                        cerr << "dcpomatic: failed to load configuration\n";
                }
@@ -276,6 +279,8 @@ Config::instance ()
 void
 Config::write () const
 {
+       LocaleGuard lg;
+       
        xmlpp::Document doc;
        xmlpp::Element* root = doc.create_root_node ("Config");