Re: Posix(?) on numeric entry



antongiulio wrote:
[...]
buffer = g_strdup_printf("%g", value);
[...]
this value appears like: 2,59787 where ',' replaces a '.'
I suppose it's related to *_NL locale replaces posix locale.
How can I replace ',' with dot notation?
Hi,
Consider g_ascii_dtostr() function:
http://developer.gnome.org/doc/API/2.0/glib/glib-String-Utility-Functions.html#g-ascii-dtostr

Note that it doesn't allocate a memory for you, you need to provide a buffer.

	Olexiy




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