diff options
author | Shih-Yuan Lee (FourDollars) <sylee@canonical.com> | 2013-09-03 21:16:59 +0800 |
---|---|---|
committer | Martin Pitt <martinpitt@gnome.org> | 2013-09-04 07:19:24 +0200 |
commit | fdc62ad245eb76c337cea2abbbeaca7ddf7c60eb (patch) | |
tree | 81a7cef67692e824f5faba7e3916d8a08ef9ec70 /src/up-main.c | |
parent | 347b8b0b93b1e96bfc8a2d54df3d2864ba1d861f (diff) | |
download | upower-fdc62ad245eb76c337cea2abbbeaca7ddf7c60eb.tar.gz |
Set locale in daemon and tool
This is necessary to properly show non-UTF8 strings in debug mode (for the
daemon) and upower --dump etc. (for the tool).
Diffstat (limited to 'src/up-main.c')
-rw-r--r-- | src/up-main.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/up-main.c b/src/up-main.c index a7e6eb6..ba79685 100644 --- a/src/up-main.c +++ b/src/up-main.c @@ -32,6 +32,7 @@ #include <glib.h> #include <glib/gi18n-lib.h> #include <glib-object.h> +#include <locale.h> #include <dbus/dbus-glib.h> #include <dbus/dbus-glib-lowlevel.h> @@ -207,6 +208,7 @@ main (gint argc, gchar **argv) #if !defined(GLIB_VERSION_2_36) g_type_init (); #endif + setlocale(LC_ALL, ""); context = g_option_context_new ("upower daemon"); g_option_context_add_main_entries (context, options, NULL); |