#4 UTF-8 SQL statement problem

closed
nobody
None
5
2004-09-02
2004-07-08
takubo
No

Dear developer,

Now, I use 0.18 with UTF-8 versions Sqlite2(compiled
with SQLITE_UTF8 symbol)
and "UTF8Encoding=True" in connection string.

It seems that sql statement hasn't converted to UTF-8.
So non-ASCII charcters in the SQL was broken.

When I use a parameter, it is converted from string
to UTF-8 by MarshalStr.GetSQLiteStr() in
BindParameters() and OK.
But building and executing(ExecuteNonQuery(),
ExecuteReader() or etc ...) SQL directly,
example for " INSERT INTO mytable VALUES( 'some
non-ASCII charctes') ",
it result is bad.

SQLite.NET pass raw string to sqlite_compile() in
OneSQLStatement.Compile(),
although SQLite needs SQL statement encoded by UTF-8.

Discussion

    • status: open --> closed