Gustavo Valdes wrote:
> 
> Hello:
>       The last comment about an internationalization issue sounds good, but
> the problems is get only when working with nome, I mean, if I make a simple
> program (just a main fuction using the atof function and including the
> stdlib.h library) it works well. But if I make a simple GUI program with
> Gnome, using an entry box to get the value from the user, convert it to
> float, adding it an arbitrary amount and then display the result in another
> entry box it does not work, so, It could be some internationalization issue,
> but it is affecting just Gnome and not the complete Linux enviroment. So,
> where could I disable or change this kind of setting?
> 
>       By the way, I have solved the problem writing a function that receives
> a char* parameter then looks for the ',' character and changes for a '.'
> character and then I use atof, and it works fine. But I REALLY want to know
> how to avoid this misbehavior.

Your simple program probably doesn't call setlocale() to set up the i18n stuff,
so it avoids the problem completely.

It seems that the locale that you are using (e.g. your LANG setting) uses
commas as decimal points.

(I had this problem in Glade itself. I had to temporarily set the locale to "C"
when saving the XML files so that it used '.' when outputting decimal points.)

Damon



_______________________________________________
Glade-devel maillist  -  [EMAIL PROTECTED]
http://lists.helixcode.com/mailman/listinfo/glade-devel

Reply via email to