r20177 - gnucash/trunk/src/backend - Change serialization of doubles in the dbi backend to use

John Ralls jralls at code.gnucash.org
Thu Jan 27 14:38:40 EST 2011


Author: jralls
Date: 2011-01-27 14:38:39 -0500 (Thu, 27 Jan 2011)
New Revision: 20177
Trac: http://svn.gnucash.org/trac/changeset/20177

Modified:
   gnucash/trunk/src/backend/dbi/gnc-backend-dbi.c
   gnucash/trunk/src/backend/sql/gnc-backend-sql.c
Log:
Change serialization of doubles in the dbi backend to use 
g_ascii_dtostr() instead of sprintf. 

The problem is that sprintf is subject to localization and will output 
e.g. 1,25 for one-and-a-quarter in European locales. SQL doesn't support 
localization, so will interpret 1,25 as two fields, 1 and 25.

Note also that GUID_ENCODING_LENGTH isn't big enough for a double, so 
that's changed to G_ASCII_DTOSTR_BUF_SIZE.





More information about the gnucash-patches mailing list