mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-06-20 07:08:29 +02:00
core: setlocale(), so that locale's env variables are honored (bgo #666516)
This commit is contained in:
parent
617af3b49d
commit
48852e112e
1 changed files with 5 additions and 1 deletions
|
|
@ -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 <dbus/dbus-glib-lowlevel.h>
|
||||
#include <dbus/dbus-glib.h>
|
||||
#include <getopt.h>
|
||||
#include <locale.h>
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
#include <signal.h>
|
||||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue