[gnome-terminal/gnome-3-10] server: Error out on unsupported locale



commit 3655613c500459f019acff9967a4e5ee8e949d45
Author: Christian Persch <chpe gnome org>
Date:   Thu Sep 12 19:42:08 2013 +0200

    server: Error out on unsupported locale
    
    (cherry picked from commit 27051edaea86908d8852e7bc66d88215b51fc179)

 src/server.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/server.c b/src/server.c
index 26d867a..4e6013b 100644
--- a/src/server.c
+++ b/src/server.c
@@ -75,6 +75,11 @@ main (int argc, char **argv)
 
   terminal_i18n_init (TRUE);
 
+  if (!g_get_charset (NULL)) {
+    g_printerr ("Non UTF-8 locale is not supported!\n");
+    return EXIT_FAILURE;
+  }
+
 #ifndef ENABLE_DISTRO_PACKAGING
 #ifdef HAVE_UBUNTU
   /* Set some env vars to disable the ubuntu modules. Their package will be 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]