You are not logged in.
Pages: 1
Hi,
I'm not follow the last change on your frameworks.
I have start a new application develop with Delphi 2006 and I have update the frameworks with last build.
I have a strange problem: if I use UTF8ToString() the result string doesn't have some char like à, ò, ù, ...
For example:
MyRecord := TSQLMyRecord.CreateAndFillPrepare(Database, '');
try
while MyRecord.FillOne do
begin
if MyRecord.ID <> 0 then
begin
MessageDlg(MyRecord.Titolo,mtError, [mbOK], 0); // GET RIGHT STRING TEXT: "qualità"
MessageDlg(UTF8ToString(MyRecord.Titolo),mtError, [mbOK], 0); // GET BAD STRING TEXT: "qualit"
end;
end;
finally
MyRecord.Free;
end;
Do you have change somethings on your framework? Any ideas?
Offline
Titolo is RawUTF8:
TSQLMyRecord = class(TSQLRecord)
private
fTitolo: RawUTF8;
published
property Titolo: RawUTF8 read fTitolo write fTitolo;
end;
I have create the databse by framework (so I think the data type is correct), then I have popolate the database by an external editor (http://sqliteadmin.orbmu2k.de/).
I just to it the same things when I have develop another application without problem, ...
Offline
If you get:
MessageDlg(MyRecord.Titolo,mtError, [mbOK], 0); // GET RIGHT STRING TEXT: "qualità"
This means that this is not UTF-8 encoded, but WinAnsiString.
Under Delphi 2006, you should here have something like "qualitàç", i.e. an UTF-8 encoded string.
Your data is wrong in the db, I guess.
Offline
OK, it's possible add a IMPORT feature into SynDBExplorer to import from csv file. So I can avoid to use external SQLite editor.
Offline
Pages: 1