From 664ec413aa2676c90b2fe9930e64143b5f448b12 Mon Sep 17 00:00:00 2001 From: Benedikt Heine Date: Thu, 23 Nov 2017 11:43:52 +0100 Subject: [PATCH] Set Locale in dunstify If specifying --icon with UTF-8 characters, the g_option_context_parse fails with an invalid byte conversion. The solution is to set the locale explicitly. For more info, see the GLib issue tracker: https://bugzilla.gnome.org/show_bug.cgi?id=737137 Fixes #443 --- dunstify.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dunstify.c b/dunstify.c index b4237cb..af03430 100644 --- a/dunstify.c +++ b/dunstify.c @@ -1,5 +1,6 @@ #include #include +#include #include #include #include @@ -252,6 +253,7 @@ void add_hint(NotifyNotification *n, char *str) int main(int argc, char *argv[]) { + setlocale(LC_ALL, ""); #if !GLIB_CHECK_VERSION(2,35,0) g_type_init(); #endif