[libgdata] tests: Call setlocale() on startup
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgdata] tests: Call setlocale() on startup
- Date: Sun, 21 Sep 2014 12:58:44 +0000 (UTC)
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]