Re: gnome 1.2, localisation and C++ streams



On 26 May 2000, Kenneth MacDonald wrote:

> I didn't see anything in the glibc docs to indicate how to turn off
> looking up LC_NUMERIC to determine the radix character for the printf
> family of functions.

char *old_locale = setlocale (LC_NUMERIC, "C");
printf("%f", foo );
setlocale (LC_NUMERIC, old_locale);

This should be done for other funtions like scanf(), atof(), ... as
well, gnome-libs 1.2 contains one such bug in gnome-scores which parses
the scores-file in a bad way. I have sent a patch to George so hopefully
it will be solved in the future (next version).

For now it means for us in sweden and other places that only the integer
part of the scores are shown. The fraction is always zero.

The bug-repporting mail-adress is not working for me. It complans that my
mail doesn't have any Package: and Version: lines. But as far as I know
they are there. This time I just sent the patch directly to George. But
that's not the best solution.

/Dennis





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]