[gnome-control-center] info: Work-around test failing in some locales



commit 4ca492bc267fe1bdd5749351254558a93e353a16
Author: Bastien Nocera <hadess hadess net>
Date:   Wed May 18 13:08:43 2011 +0100

    info: Work-around test failing in some locales
    
    https://bugzilla.gnome.org/show_bug.cgi?id=650342

 panels/info/test-hostname.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/panels/info/test-hostname.c b/panels/info/test-hostname.c
index 807b952..3135e96 100644
--- a/panels/info/test-hostname.c
+++ b/panels/info/test-hostname.c
@@ -13,7 +13,14 @@ int main (int argc, char **argv)
 	char *contents;
 	char **lines;
 
-	setlocale (LC_ALL, "");
+	/* Running in some locales will
+	 * break the tests as "ü" will be transliterated to
+	 * "ue" in de_DE, and 'u"' in the C locale.
+	 *
+	 * Work around that by forcing en_US with UTF-8 in
+	 * our tests
+	 * https://bugzilla.gnome.org/show_bug.cgi?id=650342 */
+	setlocale (LC_ALL, "en_US.UTF-8");
 	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
 
 	if (g_file_get_contents (argv[1], &contents, NULL, NULL) == FALSE) {



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