]> git.lyx.org Git - lyx.git/blobdiff - src/support/os_unix.cpp
Fix some display glitches
[lyx.git] / src / support / os_unix.cpp
index 495bb2cf8a5eeda74ad94ac442278cf0d8c660c9..2635d672f8760f2689087bd0e0d96f23aa4fe20f 100644 (file)
@@ -23,6 +23,7 @@
 #include "support/lassert.h"
 
 #include <limits.h>
+#include <locale.h>
 #include <stdlib.h>
 
 #ifdef __APPLE__
@@ -46,12 +47,16 @@ void init(int argc, char * argv[])
 {
        argc_ = argc;
        argv_ = argv;
+
+       // Set environment's default locale
+       setlocale(LC_ALL, "");
+       setlocale(LC_NUMERIC, "C");
 }
 
 
 string utf8_argv(int i)
 {
-       LASSERT(i < argc_, /**/);
+       LASSERT(i < argc_, return "");
        return to_utf8(from_local8bit(argv_[i]));
 }