mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Provide a single static instance of C++ locale.
We can't use std::locale::global because all streams imbue it by
default and if it's not 'C' (aka std::locale::classic) then we
must imbue all the streams that we don't want localized, and that's
most of them.
Provides error checking for setting the C++ locale from the environment.
This is necessary both because the environment might have an invalid
locale, which would cause an unhandled exception crash.
On windows std::locale("") can't handle some Microsoft-style locale
strings (e.g. Spanish_Spain) so we use boost::locale's gen("") function
to set the locale--though even that can't handle a Microsoft-style
locale string with an appended charset (e.g. Spanish_Spain.1252) and
that's what glibc's setlocale(LC_ALL, NULL) emits.
This commit is contained in:
@@ -613,6 +613,7 @@ libgnucash/core-utils/gnc-glib-utils.c
|
||||
libgnucash/core-utils/gnc-guile-utils.c
|
||||
libgnucash/core-utils/gnc-jalali.c
|
||||
libgnucash/core-utils/gnc-locale-utils.c
|
||||
libgnucash/core-utils/gnc-locale-utils.cpp
|
||||
libgnucash/core-utils/gnc-path.c
|
||||
libgnucash/core-utils/gnc-prefs.c
|
||||
libgnucash/doc/doxygen_main_page.c
|
||||
|
||||
Reference in New Issue
Block a user