From 48852e112e7491780850c1a21fc395c163c58dc7 Mon Sep 17 00:00:00 2001 From: Gabor Kelemen Date: Tue, 20 Dec 2011 23:38:02 +0100 Subject: [PATCH] core: setlocale(), so that locale's env variables are honored (bgo #666516) --- src/main.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index 713213d8b9..afedd502ab 100644 --- a/src/main.c +++ b/src/main.c @@ -15,7 +15,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright (C) 2004 - 2011 Red Hat, Inc. + * Copyright (C) 2004 - 2012 Red Hat, Inc. * Copyright (C) 2005 - 2008 Novell, Inc. */ @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -384,6 +385,9 @@ main (int argc, char *argv[]) exit (1); } + /* Set locale to be able to use environment variables */ + setlocale (LC_ALL, ""); + bindtextdomain (GETTEXT_PACKAGE, NMLOCALEDIR); bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); textdomain (GETTEXT_PACKAGE);