On Tue, Feb 21, 2012 at 9:07 PM, Bob Burger <burge...@gmail.com> wrote:

> > The license for David Gay's dtoa.c is not compatible with SQLite.
>
> Thanks for checking into it, and I'm very sorry to hear it's incompatible.
> Our software uses the SQLite binary interface to bind parameters in most
> cases, but there are a few occasions when users specify queries in text.
>
> What would you think of providing a configuration option for SQLite to use
> the strtod C library function?
>

strtod() doesn't work in all cases since it depends on locale - the radix
point character is usually 0x2e (".") but is sometimes 0x2c (",").
Strtod() could be made to work if we could guarantee that the locale always
specified 0x2e as the radix point character.

Also, strtod() requires UTF8 text whereas SQLite sometimes has the content
as UTF16. The string-to-binary converter for SQLite is able to handle
both.  The inability of strtod() to convert UTF16 could be worked around by
doing UTF16-to-UTF8 conversions when necessary.  But that would be still
more code that would need to be added and tested.


>
> Bob
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
D. Richard Hipp
d...@sqlite.org
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to