[libgdata] tests: Call setlocale() on startup



commit 805e6c94cf1792ca912ec1f280d355f06702840e
Author: Philip Withnall <philip tecnocode co uk>
Date:   Sun Sep 21 13:49:18 2014 +0100

    tests: Call setlocale() on startup
    
    So that the correct character encoding is set for all tests.

 gdata/tests/common.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gdata/tests/common.c b/gdata/tests/common.c
index 1193a7c..14c06f9 100644
--- a/gdata/tests/common.c
+++ b/gdata/tests/common.c
@@ -19,6 +19,7 @@
 
 #include <glib.h>
 #include <glib-object.h>
+#include <locale.h>
 #include <stdio.h>
 #include <string.h>
 #include <libxml/parser.h>
@@ -51,6 +52,8 @@ gdata_test_init (int argc, char **argv)
        GError *child_error = NULL;
        gint i;
 
+       setlocale (LC_ALL, "");
+
 #if !GLIB_CHECK_VERSION (2, 35, 0)
        g_type_init ();
 #endif


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