Hi,
I have a problem with zeos in Delphi 2010.
Environment:
Delphi 2010, Zeos 7 (SVN 794), PostgreSQL (latest 8.4)
I'm sorry for image but it's simplest for me:
Picture has upper and lower parts. In upper part we have connection to UTF8 database and in lower part WIN1250 database.
In both cases in DB connection properties we have set properties: codepage=... and client_encoding=..
Sample data is polish national signs.
Record with id = 1 was entered i outer software (EMS) but record with id = 3 was entered with ZUpdateSQL component (the same text as id = 1)
As you can see everything look OK when we have UTF8 database but there is a problem with WIN1250 encoding. There are 2 problems:
- TZReadOnlyQuery can't read correctly (outer entered data)
- TZUpdateSQL can't write correctly (own entered data) - but in the same time TZReadOnlyQuery read this data ok.
I know that solution is change DB encoding but for old projects it's not so simple solution for me.
Can anybody help ?
Regards:
Jaromir
Bug in TZReadOnlyQuery and TZQuery
Moderators: gto, EgonHugeist, olehs
It seems that solution is like above:
DBConnection.Properties.Clear;
DBConnection.Properties.Add('codepage=UTF8');
DBConnection.Properties.Add('client_encoding=UTF8');
Even if you have DB encoded for example in WIN1250 (as me). I think that with above properties there is online reencoding from WIN1250 to UTF8 - postgresql server do this on the fly.
Regards
Jaromir
DBConnection.Properties.Clear;
DBConnection.Properties.Add('codepage=UTF8');
DBConnection.Properties.Add('client_encoding=UTF8');
Even if you have DB encoded for example in WIN1250 (as me). I think that with above properties there is online reencoding from WIN1250 to UTF8 - postgresql server do this on the fly.
Regards
Jaromir