Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Firedac Memtable utf 8 problem



Permlink Replies: 4 - Last Post: Oct 10, 2016 11:07 PM Last Post By: Liste Listeler Threads: [ Previous | Next ]
Liste Listeler

Posts: 49
Registered: 7/26/07
Firedac Memtable utf 8 problem
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 10, 2016 11:26 AM
Hi,

I am testing Firedac Memtable for Azeri language.

I have some fields
like "Torpaq xəritələrii"
I can see it in memo.
But if I insert it in Fdmemtable I can not see the Azeri chars.

I have screen shut in here http://prntscr.com/cs6vgk
and I have small example file in here

https://www.dropbox.com/s/tdpy9vly99ildn1/FiredacUtf8Problem.zip?dl=0
The problem soruce is ,
Firedac string field is AnsiString and my text is utf8 string.
Dmitry Arefiev

Posts: 1,406
Registered: 12/7/03
Re: Firedac Memtable utf 8 problem
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 10, 2016 11:59 AM   in response to: Liste Listeler in response to: Liste Listeler
Try to make the field of ftWideString data type. ftString is of ANSI not UTF8 data type.

--
With best regards,
Dmitry
Liste Listeler

Posts: 49
Registered: 7/26/07
Re: Firedac Memtable utf 8 problem
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 10, 2016 9:24 PM   in response to: Dmitry Arefiev in response to: Dmitry Arefiev
Hi Dmitry

I have been test it before. But that time there is no result in the grird.

http://prntscr.com/cscuj5
namew field is widestring but it is empty.

mycode is
FDMemTable1.Open;
FDMemTable1.Insert;
FDMemTable1name.Value := Memo1.Lines[0];
FDMemTable1namew.Value := Memo1.Lines[0];
FDMemTable1.Post;
FDMemTable1.Insert;
FDMemTable1name.Value := Memo1.Lines[0];

FDMemTable1namew.Value := Memo1.Lines[1];
FDMemTable1.Post;
Dmitry Arefiev

Posts: 1,406
Registered: 12/7/03
Re: Firedac Memtable utf 8 problem
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 10, 2016 10:02 PM   in response to: Liste Listeler in response to: Liste Listeler
Not sure what and how you done, but I replaced TStringField with TWideStringField,
run the project, and it works correctly now.

--
With best regards,
Dmitry

Liste Listeler

Posts: 49
Registered: 7/26/07
Re: Firedac Memtable utf 8 problem
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 10, 2016 11:07 PM   in response to: Dmitry Arefiev in response to: Dmitry Arefiev
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02