mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Call setlocale() with the right form of locale code on Windows.
Perversely Windows uses the form xx-YY for its own localization functions but xx_YY for the posix ones including setlocale().
This commit is contained in:
parent
114efe5936
commit
d30cf25c45
@ -792,12 +792,10 @@ set_win32_thread_locale()
|
||||
if (IsValidLocaleName(wlocale))
|
||||
{
|
||||
LCID lcid = LocaleNameToLCID(wlocale, LOCALE_ALLOW_NEUTRAL_NAMES);
|
||||
printf ("win32_thread_locale setting %s from unix environment.\n",
|
||||
locale);
|
||||
SetThreadLocale(lcid);
|
||||
locale[2] = '_';
|
||||
setlocale (LC_ALL, locale);
|
||||
sys_locale = locale;
|
||||
g_free(locale);
|
||||
g_free(wlocale);
|
||||
return;
|
||||
}
|
||||
@ -900,8 +898,6 @@ main(int argc, char ** argv)
|
||||
g_setenv ("LC_ALL", "C", TRUE);
|
||||
setlocale (LC_ALL, "C");
|
||||
}
|
||||
else
|
||||
printf ("Locale set to %s\n", sys_locale);
|
||||
#ifdef HAVE_GETTEXT
|
||||
{
|
||||
gchar *localedir = gnc_path_get_localedir();
|
||||
|
Loading…
Reference in New Issue
Block a user