Page 1 of 1

Bug with unicode delphi 2009

Posted: Wed 22 Apr 2009 13:48
by pwatel
the unicodes char get lost in translation....
I could not find an option useunicode=true like in a DBconnection
and ftwidestring does not cut it

Edit1.Text := '6. Modéré';
VirtualTable1.Active := True;
VirtualTable1.Clear;
VirtualTable1.Insert;
VirtualTable1.Fields[0].Value := Edit1.Text ;
// of ftstring type if use ftwidestring it does not work at all
VirtualTable1.Post;
the accents are lost and it shows or read: 6. Modere
which is not good if you are looking a unicode file names like Itunes..
Or I am missing something... an option
I could not find it..any ideas thanks
regards
Philippe

Posted: Thu 23 Apr 2009 07:06
by Plash
You should use ftWideString. It was not working because you did not set the Size property for the FieldDef. You should set the Size property to the maximum size of data in the field.

ok

Posted: Fri 24 Apr 2009 08:21
by pwatel
Yes it works thank you
But if all in D2009 is unicode why ftstring is not unicode by default
It is a pain sometimes automatic sometimes not
not only your product a lot of functions
regards
PW

Posted: Mon 27 Apr 2009 07:26
by Plash
DataType of a field determines the internal format for storing data. ftString means that data are stored in the Ansi format. ftWideString means that data are stored in the Unicode format. CodeGear has decided not to change this in Delphi 2009.