Yes, Y've made following change:
Code: Select all
function TZSQLiteStatement.ExecuteUpdate(const SQL: string): Integer;
var
ErrorCode: Integer;
ErrorMessage: PAnsiChar;
begin
ErrorMessage := '';
ErrorCode := FPlainDriver.Execute(FHandle, PAnsiChar(UTF8String(SQL)), nil, nil,
ErrorMessage);
Added casting to UTF8String and it becomes working
Test also passed with Cyrillic sybmols
But select with the same cyrilic gave me wrong result:
I saw previously inserted UTF8 text as ANSI (обменник).
Seems there could be also problem with backward conversion.
As I see code above:
Code: Select all
function TZSQLiteStatement.ExecuteQuery(const SQL: string): IZResultSet;
var
ErrorCode: Integer;
ErrorMessage: PAnsiChar;
SQLTail: PAnsiChar;
StmtHandle: Psqlite_vm;
ColumnCount: Integer;
ColumnValues: PPAnsiChar;
ColumnNames: PPAnsiChar;
begin
ErrorMessage := '';
SQLTail := '';
ColumnCount := 0;
{$IFDEF DELPHI12_UP}
ErrorCode := FPlainDriver.Compile(FHandle, PAnsiChar(UTF8String(SQL)), Length(SQL), SQLTail,
StmtHandle, ErrorMessage);
{$ELSE}
ErrorCode := FPlainDriver.Compile(FHandle, PAnsiChar(SQL), Length(SQL), SQLTail,
StmtHandle, ErrorMessage);
{$ENDIF}
There was already added casting to UTF8, but not sure about correct results interpretation.