I'm not using the various 'bind' calls but simply executing SQL inserts/updates/querys with _sqlite3_prepare, _sqlite3_step.
notice that the insert comes through as unicode, the update is recognized as unicode but stored as ascii. i looked into the code one level deeper and it looks like the storage in memory (sqlite3_value) has an 'encoding' property. the encoding is set to 2 (unicode), but the string is an ascii one. this worked for me in 3.3.8, didn't try 3.3.9. Scott Hess wrote: > > Are you absolutely, positively certain that you're calling > sqlite3_bind_text16() when setting up the update? I ask because I > recently spent a long afternoon tracking down that basic mistake :-). > > -scott > > > On 1/11/07, ohadp <[EMAIL PROTECTED]> wrote: >> >> here's the detailed description of the apparent bug: >> >> i'm using the _16 versions for getting text from an fts1 table. >> if i insert data and select, i get good data, meaning my call to >> sqlite3_column_text16(..) returns a pointer to a UNICODE string. >> if i update and then select, my call to sqlite3_column_text16(..) returns >> a >> pointer to an ASCII string instead of a UNICODE one. The string if >> interpreted visually is the right string, but calling the unicode version >> of >> the function and receiving an ascii string is a problem :-) >> >> >> >> ohadp wrote: >> > >> > The precompiled binaries... work :-) >> > i stepped in and it seems like the problem is an ascii/unicode problem. >> > what happens is that i call sqlite3_column_text16 and get back an ASCII >> > string... >> > i haven't touched the rest of my code so let me ask if something's >> changed >> > in this latest release ? >> > >> > >> > Scott Hess wrote: >> >> >> >> On 1/11/07, ohadp <[EMAIL PROTECTED]> wrote: >> >>> Scott Hess <[EMAIL PROTECTED]> writes: >> >>> > CREATE VIRTUAL TABLE t USING fts1(content); >> >>> > INSERT INTO t (rowid, content) VALUES (1, 'this is a test'); >> >>> > UPDATE t SET content = 'that was a test' WHERE rowid = 1; >> >>> > >> >>> > -- The following is returning 'gibberish here' for me: >> >>> > SELECT content FROM t WHERE rowid = 1; >> >>> >> >>> I'm using the latest version available for download on the sqlite >> site, >> >>> 3.3.10. >> >>> Compiling on Windows with MSVC (2003). >> >>> I tried the script you provide and I get gibberish. >> >>> To be sure I selected the data before the update and it comes back >> >>> correctly. >> >> >> >> Odd, it works fine for me (compiling from CVS head on Linux). I just >> >> downloaded the 3.3.10 tarball and recompiled from scratch (again on >> >> Linux), and it also works fine. >> >> >> >> You're compiling it? Have you tried running the pre-compiled Windows >> >> binaries? [I'm only assuming that fts1 is available in there somehow >> >> :-).] >> >> >> >> -scott >> >> >> >> >> ----------------------------------------------------------------------------- >> >> To unsubscribe, send email to [EMAIL PROTECTED] >> >> >> ----------------------------------------------------------------------------- >> >> >> >> >> >> >> > >> > >> >> -- >> View this message in context: >> http://www.nabble.com/3.3.10-data-corruption-on-updating-fts1-string-table-tf2960926.html#a8288429 >> Sent from the SQLite mailing list archive at Nabble.com. >> >> >> ----------------------------------------------------------------------------- >> To unsubscribe, send email to [EMAIL PROTECTED] >> ----------------------------------------------------------------------------- >> >> > > ----------------------------------------------------------------------------- > To unsubscribe, send email to [EMAIL PROTECTED] > ----------------------------------------------------------------------------- > > > -- View this message in context: http://www.nabble.com/3.3.10-data-corruption-on-updating-fts1-string-table-tf2960926.html#a8288879 Sent from the SQLite mailing list archive at Nabble.com. ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------