On Mon 24 Aug 2015 12:05:02 PM CEST, Markus Armbruster wrote: >> This seems to happen because of GTK+ calling setlocale(). The easiest >> solution is probably to call setlocale(LC_NUMERIC, "C") before >> snprintf() (or at start-up ui/gtk.c), but opinions are welcome. > > A library calling setlocale() is a big no-no in my book. > > Overriding LC_NUMERIC as you propose should fix this particular bug. >However, exposing unprepared code to locale is not a good idea for >other categories as well. LC_COLLATE and LC_CTYPE are even sneakier >sources of bugs in my experience. I'd really, really prefer to stay in >the "C" locale *completely*.
You can prevent GTK+ from calling setlocale() by using gtk_disable_setlocale() before gtk_init(), but note that setlocale() is needed for gettext. Berto