[patch_done] Setting up Unicode connection with Zeos 7
Posted: 16.07.2011, 23:00
Hello,
today I switched to Zeos 7 (SVN-Builds) in order to use Delphi 2009. But now I have some questions because I have to convert the strings from/to database - and I don't know why. Data will be stored correctly, but when I load data from DB "Müller" becomes mostly unreadable (you know what I mean
Firstly, my settings/environment:
That's all I had to set up.
How I store data:
Remember: In Database "äöü" is stored correcty.
How I read data:
The result from the read-function is "string" (Delphi 2009)
This will end up in encoding-display-errors. When I convert with "UTF8ToString", everything is fine.
Is this behaviour correct?
Thanks in advance!
today I switched to Zeos 7 (SVN-Builds) in order to use Delphi 2009. But now I have some questions because I have to convert the strings from/to database - and I don't know why. Data will be stored correctly, but when I load data from DB "Müller" becomes mostly unreadable (you know what I mean
Firstly, my settings/environment:
Code: Select all
Database: Firebird 2.1
Collate/Charset: UTF8
ZConnection.Properties.Add('codepage=utf8');
ZQuery.Properties.Add('codepage=utf8');
How I store data:
Code: Select all
...VALUES (:data1, :data2, :data3.......
ZQuery.ParamByName('data1').AsString:='äöü';
How I read data:
Code: Select all
...SELECT * FROM ....
result:=ZQuery.FieldByName('test1').AsString;
This will end up in encoding-display-errors. When I convert with "UTF8ToString", everything is fine.
Is this behaviour correct?
Thanks in advance!