Problems with codepages
Posted: 15.08.2008, 10:23
Hi to all!
I use following components:
ZConnection - ZQuery - DataSource - DBGrid
After that
I see some strange meaningless symbols... It looks like win1252 encoding, but source symbols are in win1251 encoding (and default system encoding is win1251).
I tried:
1. write Codepage=cp1251 in ZConnection.Properties
2. write such code:
(It forces Postgre to return query result in win1251 encoding). Also I tried use other encoding besides win1251 in first query...
3. Replace all "win1252" values to "win1251" in Windows Registry.
In any case result looks like Delphi (or Zeos?) consider query result encoding is win1252. Anybody knows, how to force them show correct encoding?
I use following components:
ZConnection - ZQuery - DataSource - DBGrid
After that
Code: Select all
ZQuery1.Close;
ZQuery1.SQL.Text:='select * from data_filials';
ZQuery1.ExecSQL;
I tried:
1. write Codepage=cp1251 in ZConnection.Properties
2. write such code:
Code: Select all
ZQuery1.Close;
ZQuery1.SQL.Text:='set client_encoding to ''win1251''';
ZQuery1.ExecSQL;
ZQuery1.SQL.Text:='select * from data_filials';
3. Replace all "win1252" values to "win1251" in Windows Registry.
In any case result looks like Delphi (or Zeos?) consider query result encoding is win1252. Anybody knows, how to force them show correct encoding?