]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/main.cc
Issue 4156: Define Smob<> constructors
[lilypond.git] / lily / main.cc
index 7fb2f324572db0b434fae0155103ab3d7fe611ee..bae977603c4c42a7fd18fd05339f8d5d4e5b8d3a 100644 (file)
@@ -18,6 +18,7 @@
 */
 
 #include "main.hh"
+#include "lily-guile.hh"
 
 #include <cassert>
 #include <clocale>
@@ -553,6 +554,20 @@ setup_localisation ()
      Disable localisation of float values. */
   setlocale (LC_NUMERIC, "C");
 
+#if GUILEV2
+  // In order not to have this porting aid backfire to GUILE1 usage,
+  // this is only compiled in the GUILEV2 version.  It should
+  // eventually be replaced with proper multibyte communication with
+  // GUILE2, but in the mean time it seems that this is the least
+  // invasive path to get comparable results between the
+  // not-really-multibyte-supporting GUILE1 and GUILE2
+
+  /* Disable character sets */
+  setlocale (LC_CTYPE, "C");
+  /* But our text domain is in UTF-8 */
+  bind_textdomain_codeset ("lilypond", "UTF-8");
+#endif
+
   string localedir = LOCALEDIR;
   if (char const *env = getenv ("LILYPOND_LOCALEDIR"))
     localedir = env;