On Fri, Sep 19, 2014 at 4:22 PM, Andrea Peri <aperi2...@gmail.com> wrote:
> Hi, > I'm trying to implement a sqlite extension using some string metric > algorithms. > > My goal is to compare two strings and retrieve the metric. > > I understand that to use the argv[0] and argv[1] args inside an > extension function is need to apply to them the > sqlite3_value_text(...) function. > > Unfortunately seem that with this approach in some situations the > metric of the strings change. > > I see this comparing the results frominside the sqlite extension with > thesame algorithm in a standalone sample program. > > I don't know well why is happening this but I guess it is due to the > sqlite3_value_text(..) > > Is this possible ? And there is an alternative approach to avoid to > use the sqlite3_value_text(...) ? > Unless you are doing UTF8<->UTF16 conversions, the output of sqlite3_value_text() will be exactly, bit-for-bit, what you put in. Except for doing conversions between UTF8 and UTF16, SQLite never changes the text in any way. -- D. Richard Hipp d...@sqlite.org _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users