From 36af567045c1c4f81e40c65be4df0875ba338372 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Tue, 20 Feb 2018 13:27:50 +0000 Subject: [PATCH] tests: Ensure gettext strings are loaded in UTF-8 in gdatetime.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See the previous commit. By convention, GLib assumes strings loaded from gettext are always in UTF-8, but we do need to tell gettext this. In most other tests, it doesn’t matter; but in the gdatetime test, we test re-encoding month names from EUC-JP, so we need to ensure the translations start in UTF-8 correctly. Signed-off-by: Philip Withnall https://bugzilla.gnome.org/show_bug.cgi?id=793578 --- glib/tests/gdatetime.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/glib/tests/gdatetime.c b/glib/tests/gdatetime.c index 1d11541b7..844f29e15 100644 --- a/glib/tests/gdatetime.c +++ b/glib/tests/gdatetime.c @@ -20,6 +20,7 @@ #include #include +#include #include #include #include @@ -2276,6 +2277,7 @@ main (gint argc, g_test_bug_base ("http://bugzilla.gnome.org/"); /* GDateTime Tests */ + bind_textdomain_codeset ("glib20", "UTF-8"); g_test_add_func ("/GDateTime/invalid", test_GDateTime_invalid); g_test_add_func ("/GDateTime/add_days", test_GDateTime_add_days);