From: Gavin Sinclair Date: 2004-07-04T23:11:31+09:00 Subject: Re: SQLite/Ruby update pending On Sunday, July 4, 2004, 11:59:43 PM, Jamis wrote: >>>SQLite::Database.quote(...) will do just that. It is new in 1.2.9.1. >> >> >> Does that take care of NULs? >> >> Gavin > What do you mean? Can you give me an example? SQLite, I believe, chokes on strings that have NUL (0) characters in them, because C uses \0 as the string terminator and, well, everyone else should work like that too. Or something. Since SQLite stores everything as a string (I believe), you have no chance of storing binary data in SQLite directly -- that's too likely to contain \0 in it. I tend to base64-encode any binary data. That's unlikely to please people who need performance, though. I don't know what the "best practice" is, but it would be nice to identify it and provide it in your package. Cheers, Gavin