On 31/1/2010, "David Nečas" <y...@physics.muni.cz> wrote:
>> I've not had to deal with locales before, and I'm trying to understand >> what GTK does to the locale when it initializes so I can work around it >> and save data files as "C" locale. I've tried adding >> setlocale(LC_NUMERIC, "C") to the start of main, and after calling >> gtk_init, but it seems to make no difference. > >Generally, changing locale locally is fragile and better avoided. I've tried the above out by storing the current locale setting, changing it to "C" and then restoring the locale setting once read/write is finished and it seems to work (I installed a locale using commas as decimal point). But I was told not to do this (on stackoverflow), but without the reason why - and to use ieee754.h (which is no good considering I'm mainly using MPFR). Why is store/change/restore of locale bad? Thanks. James. _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list