SQLite behavior is correct (the SQL standard requires that the decimal point is ".")
SOCI behavior is incorrect. It's non-trivial to implement the correct behavior in a thread-safe and portable way. We discussed it on soci-devel and at the time decided to ignore the issue until some user hits it. I guess now would be a good time to revisit it. Thanks, Aleksander On Fri, Jun 5, 2009 at 5:24 AM, Sören Meyer-Eppler<[email protected]> wrote: > Hey, > > I have just stumbled over a problem with SOCI and the SQLite backend on > a German locale windows system. The German locale uses "," as the > decimal point instead of the usual ".". SOCI uses strtod for parsing > doubles from an SQL return string. strtod is locale dependent and > expects a comma. SQLite, however, seems to ignore the locale => clash. > > Summary: > SQLite always returns decimals in "C" locale > SOCI parses them according to the user's locale setting > > Proposed fix: > Confirm SQLite behaviour with the SQLite developers and implement locale > independent double parsing for the SQLite backend. > > cheers, > > Sören > > -- > Sören Meyer-Eppler > software developer > [email protected] > http://www.BuschnicK.net > > ------------------------------------------------------------------------------ > OpenSolaris 2009.06 is a cutting edge operating system for enterprises > looking to deploy the next generation of Solaris that includes the latest > innovations from Sun and the OpenSource community. Download a copy and > enjoy capabilities such as Networking, Storage and Virtualization. > Go to: http://p.sf.net/sfu/opensolaris-get > _______________________________________________ > Soci-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/soci-users > ------------------------------------------------------------------------------ OpenSolaris 2009.06 is a cutting edge operating system for enterprises looking to deploy the next generation of Solaris that includes the latest innovations from Sun and the OpenSource community. Download a copy and enjoy capabilities such as Networking, Storage and Virtualization. Go to: http://p.sf.net/sfu/opensolaris-get _______________________________________________ Soci-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/soci-users
