My code:
Code: Select all
var s: string;
....
with LiteQuery do begin
Close; // 0 1 2 3 4
SQL.Text := 'select internal_idx, dt_utc, uinfrom, msg_type, msg ' +
'from privates ' +
'where uinwith=:uinwith and uin_owner=:uin_owner and dt_utc>=:dtFrom and dt_utc<=:dtTo and servid=:servid ' +
'order by dt_utc';
ParamByName('uinwith').AsInteger := iUINWith;
ParamByName('uin_owner').AsInteger := iUINOwner;
ParamByName('servid').AsInteger := iServID;
ParamByName('dtFrom').AsDateTime := dtUTCFrom;
ParamByName('dtTo').AsDateTime := dtUTCTo;
Open;
while not eof do begin
s := FieldList[4].AsString;
Next;
end;
end;
"s" variable: "L$?арыш айла?ы/?арышала?"
Why in "s" variable is stored a non-unicode string? In database all Ok. How can I get the original UTF8 string from DB in this query?