From d91c67bf93fd8ca024c32d38b00377a6fef606c9 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Wed, 25 Apr 2007 01:31:55 +0000 Subject: [PATCH] g_locale_to_utf8 seems to work here and its a simpler function all, and i dont have to specify iso-8891whatever in it, so maybe its actually more portable. or maybe it breaks things. we'll see, won't we. --- openbox/prop.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/openbox/prop.c b/openbox/prop.c index d13a0515..efb46bd4 100644 --- a/openbox/prop.c +++ b/openbox/prop.c @@ -302,8 +302,7 @@ gboolean prop_get_string_locale(Window win, Atom prop, gchar **ret) gchar *s; if (get_stringlist(win, prop, &list, &nstr) && nstr) { - s = g_convert(list[0], strlen(list[0]), "UTF-8", "ISO-8859-1", - NULL, NULL, NULL); + s = g_locale_to_utf8(list[0], -1, NULL, NULL, NULL); XFreeStringList(list); if (s) { *ret = s; @@ -332,8 +331,7 @@ gboolean prop_get_strings_locale(Window win, Atom prop, gchar ***ret) (*ret)[count] = NULL; /* null terminated list */ for (i = 0, it = strs; it; ++i, it = g_slist_next(it)) { - (*ret)[i] = g_convert(it->data, -1, "UTF-8", "ISO-8859-1", - NULL, NULL, NULL); + (*ret)[i] = g_locale_to_utf8(it->data, -1, NULL, NULL, NULL); /* make sure translation did not fail */ if (!(*ret)[i]) (*ret)[i] = g_strdup(""); -- 2.39.2