[gnome-desktop-testing/wip/smcv/allow-unicode] runner: Do basic locale setup
- From: Simon McVittie <smcv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-desktop-testing/wip/smcv/allow-unicode] runner: Do basic locale setup
- Date: Wed, 27 Jul 2022 08:44:39 +0000 (UTC)
commit 8892ed74c2b1f175989e6a0db3ea3235ae61e429
Author: Simon McVittie <smcv collabora com>
Date: Wed Jul 27 09:43:37 2022 +0100
runner: Do basic locale setup
Otherwise, GLib messages that contain Unicode quote marks will not be
displayed correctly.
Signed-off-by: Simon McVittie <smcv collabora com>
src/gnome-desktop-testing-runner.c | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/src/gnome-desktop-testing-runner.c b/src/gnome-desktop-testing-runner.c
index da49e14..584c6ee 100644
--- a/src/gnome-desktop-testing-runner.c
+++ b/src/gnome-desktop-testing-runner.c
@@ -24,6 +24,7 @@
#include <gio/gio.h>
+#include <locale.h>
#include <unistd.h>
#include <fcntl.h>
#include <stdlib.h>
@@ -864,6 +865,8 @@ main (int argc, char **argv)
app->tests = g_ptr_array_new_with_free_func ((GDestroyNotify)g_object_unref);
app->failed_test_msgs = g_ptr_array_new_with_free_func ((GDestroyNotify)g_free);
+ setlocale (LC_ALL, "");
+
/* avoid gvfs (http://bugzilla.gnome.org/show_bug.cgi?id=526454) */
g_setenv ("GIO_USE_VFS", "local", TRUE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]