Jump to content
Sign in to follow this  
Savvas M

Problem with firedac and Russian - Greek letters in android

Recommended Posts

I have a problem with non-English letters (eg Russian - Greek) in an android app when I store them in sqlite db with firedac (in android 10 and 11 they appeared wrong. In version 6 that I tried they appear correctly)

They all appear as ???????

I tried also with Firedac_SQLite demo (in Mobile Snippets folder)  that ships with Rad studio (10.4.1 and 10.4.2) and I have the same behavior (add a task and save it I see it as ??????.. in case that I don't use English letters).  

I tried both 32 and 64 versions of android. 

Does anyone have any idea how I can solve this?
 

Thanks in advance.

Share this post


Link to post
Guest
Posted (edited)

maybe help you (or not)

-- SQLiteAdmin DB = MyNewDBSQLite3.s3db
-- VCL project test
-- FireDAC components

				procedure TForm1.FormCreate(Sender: TObject);
				begin
				  Memo1.Lines.Clear;
				  //
				  FDConnection1.Connected          := false;
				  FDConnection1.Params.Values['Database']     := 'D:\RADRIOTests\VCL_SQLite_DB_Unicode_Test\MyNewDBSQLite3.s3db';
				  FDConnection1.Params.Values['OpenMode']     := 'CreateUTF16';
				  FDConnection1.Params.Values['StringFormat'] := 'Unicode';
				end;
				
				
				Memo1.Lines.Add('Field = Text_Any = ' + FDQuery1.FieldDefs.Items[1].FieldClass.ClassName); == Field = Text_Any = TWideStringField				

				

 

image.thumb.png.5a3d030238bafd4f57942f575c701fe3.png

 

 

				

				FDConnection info:
				
				==========
				Connection definition parameters
				==========
				Database=D:\RADRIOTests\VCL_SQLite_DB_Unicode_Test\MyNewDBSQLite3.s3db
				StringFormat=Unicode
				OpenMode=CreateUTF16
				DriverID=SQLite
				==========
				FireDAC info
				==========
				Tool = RAD Studio 10.3
				FireDAC = 17.0.0 (Build 93731)
				Platform = Windows 32 bit
				Defines = FireDAC_NOLOCALE_META;FireDAC_MONITOR
				==========
				Client info
				==========
				Loading driver SQLite ...
				DLL = <sqlite3_x86.obj statically linked>
				Client version = 3.28.0
				Compile options = DEFAULT_CACHE_SIZE=8000;DEFAULT_FILE_FORMAT=4;
				  DEFAULT_JOURNAL_SIZE_LIMIT=1048576;
				  DEFAULT_PAGE_SIZE=4096;DEFAULT_RECURSIVE_TRIGGERS;
				  ENABLE_COLUMN_METADATA;ENABLE_DBSTAT_VTAB;
				  ENABLE_FTS3;ENABLE_FTS3_PARENTHESIS;ENABLE_FTS4;
				  ENABLE_FTS5;ENABLE_JSON1;ENABLE_RBU;ENABLE_RTREE;
				  ENABLE_STAT4;HAS_CODEC;OMIT_AUTOINIT;TEMP_STORE=2;
				  THREADSAFE=2;USE_URI
				==========
				Session info
				==========
				Current catalog = 
				Current schema = 
				Total changes = 0
				Database encoding = UTF8
				Encryption mode = <unencrypted>
				Cache size = 10000				

				

hug

Edited by Guest

Share this post


Link to post

Thank's for your answer but it didn't help in android, in windows that I tried it works fine.

Share this post


Link to post
Posted (edited)

Hi,

Maybe this is the same problem as arabic, a font problem and not a database problem.

I don't remember in which post I saw that, but I remember changing some emb. units did the trick for arabic.

(

changing those 3 files FMX.TextLayout.GPU,

FMX.FontGlyphs and FMX.FontGlyphs.Android.

)

Edited by Serge_G

Share this post


Link to post

Hi, thank's for the reply,

It must have to do with firedac, I just tried the same example using dbexpress and it works correctly.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×