Though commit a14caafa8c was not wrong per-se, it's a bit too much. ;-) Functions like g_ascii_dtostr() already exists for this very purpose of converting a double/float to string in a locale-independent format.
a14caafa8c