mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-20 11:48:30 -06:00
Prevent crashing due to unsupported locale settings
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23750 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
cbfb4ef1af
commit
5670f2b077
@ -712,6 +712,15 @@ main(int argc, char ** argv)
|
||||
set_mac_locale();
|
||||
#endif
|
||||
gnc_environment_setup();
|
||||
#ifndef MAC_INTEGRATION /* setlocale already done */
|
||||
if (!setlocale (LC_ALL, ""))
|
||||
{
|
||||
g_print ("The locale defined in the environment isn't supported. "
|
||||
"Falling back to the 'C' (US English) locale\n");
|
||||
g_setenv ("LC_ALL", "C", TRUE);
|
||||
setlocale (LC_ALL, "C");
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_GETTEXT
|
||||
{
|
||||
gchar *localedir = gnc_path_get_localedir();
|
||||
|
Loading…
Reference in New Issue
Block a user