1

Topic: FireDac does not understand the coding in FTS to the table of basis SQLITE.

There is basis SQLITE with Encoding=UTF8.
I read from basis by means of AnyDac (FireDac) in Delphi XE3 with ADQUERY and with ADTABLE.
When there is a normal table
CREATE TABLE table0 (mytext Ntext, publishdate date);
INSERT INTO (mytext, publishdate) VALUES (' greetings ', ' 1998-12-07 ')
All is normal - ADQUERY with ADTABLE return mytext =''
And at creation FTS of the table
CREATE VIRTUAL TABLE table0 USING FTS4 (mytext, publishdate);
INSERT INTO (mytext, publishdate) VALUES (' greetings ', ' 1998-12-07 ')
At reading instead of ' greetings ' are had '?????? ', i.e. in this case FireDAC reads this data as ANSISTRING.
NTEXT, NVARCHAR near to mytext at table creation do not help.
In basis it is written down truly - ' greetings ' (opened basis with SQLITEEXPERT).
What it is necessary to make, that and in the second case FireDAC returned in the correct coding?
(SQLQuery from dbExpress in DelphiXE3 returns ' greetings ')

2

Re: FireDac does not understand the coding in FTS to the table of basis SQLITE.

More likely it is bug FireDac
In a file uADPhysSQLite.pas
In procedure ADSQLiteTypeName2ADDataType
For case ABaseTypeName = ' VARCHAR'
Lines
SetLen (AOptions. FormatOptions. MaxStringSize, False);
AType: = dtAnsiString;
Replaced on
SetLen (AOptions. FormatOptions. MaxStringSize, True);
AType: = dtWideString;