How can I make gzprintf (or printf in general) to use "." as decimal separator, effectively ignoring LC_NUMERIC or using "LC_NUMERIC = C".
Background: My program which uses gettext , does setlocale (LC_ALL, ....) to change it's locale. But at one point I need to write to a measurement file which should have a fixed "." as decimal separator. Of course I can do something like
const char *old = setlocale (LC_NUMERIC, NULL);
... make copy
setlocale (LC_NUMERIC, "C");
... use gzprintf
setlocale (LC_NUMERIC, old_copy);
but I fear runtime problems because I have to write samples with 2kHz to the file but haven't benchmarked it yet.