[gnome-db] Float troubles with non-C locale



Before all, thank you for your efforts: in my opinion libgda is a good project 
that tries to solve a really common problem.

Now the question: I have LC_ALL and sons set to it_IT but when I get a 
floating point value from a MySql table (throught 
gda_data_model_get_value_at()) the fraction part is lost. In this locale, 
floating numbers use the comma as decimal separator. As a temporary 
workaround I used:

setlocale(LC_ALL, "");
setlocale(LC_NUMERIC, "C");

in main(), and all works properly, of course loosing the locale format for 
numbers.

I dont know if this is a well-known problem (in a quick search in the mailing 
archives I've found something related to date&time, but not to float), but if 
you need a working example or something else, let me know (anyway, the demo 
programs share the same problem).

Thank you,

-- Nicola



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