GNOME Bugzilla – Bug 115409
gnumeric non-functional in locale de_DE
Last modified: 2004-12-22 21:47:04 UTC
The summary may overstate the problem slightly but: locale de_DE enter 123,45 in A1, result: 123,00 What happened to the decimals? enter =123.45 in A2, warning: Mehrfache Ausdrücke werden in diesem Zusammenhang nicht unterstützt (Multiple expressions are not supported in this context) apparently the decimal separator (comma) is not correctly parsed.
Is this before or after the extra format.c fix? If after, you need to figure out why the locale's decimal separator gets set to ".".
After reading the /topic I updated my tree and the format.c file jumped by 2 versions. So I suppose I got the latest fix. And it didn't help. I agree we need to figure out why the LC_NUMERIC are set to C rather than de_DE as all the others.
the culprit seems to be gnome_print_config_default
and the 2 potential setlocale calls are:
+ Trace 37916
The first setlocale call in ppdOpen sets the decimal_point to . and the second does not revert that change. As far as I can tell from the libcups source, the LC_NUMERIC (or LC_ALL based on a env var) is et to `C' and hen reset to the original. Apparently that is not happening correctly.
I would have thought that char *oldlocale; oldlocale = setlocale(LC_NUMERIC, NULL); do stuff setlocale(LC_NUMERIC, oldlocale); would preserve the locale. (That is what they do in ppdOpen().) I tturns out that if we wrap this around the call to gnome_print_config_default the oldlocale string changes in between the two calls to setlocale. So that does not work. We would need to: char *oldlocale; oldlocale = g_strdup(setlocale(LC_NUMERIC, NULL)); do stuff setlocale(LC_NUMERIC, oldlocale); g_free (oldlocale);
fixed by preserving the locale across the call to gnome_print_config_default I'll try to file a bug with libcups.