Page 1 of 1

Delphi7 + zeos 7.1.3 + PostgreSQL € char saved as Ôé¼

Posted: 30.07.2014, 18:05
by aleroot
I'm experiencing a strange problem saving € sign into a PostgreSQL 9.3 database, the € sign is saved as : Ôé¼ .

I even tried to change the following properties on the TZConnection object, but with no luck :

Code: Select all

      ZDBase.Properties.Values['codepage']:='WIN1252'; 
      ZDBase.Properties.Values['client_encoding']:='WIN1252'; 
The PostgreSQL database encoding is : WIN1252, Italian_Italy.1252 .

With MySQL and MSSQL I have no problem .

Re: Delphi7 + zeos 7.1.3 + PostgreSQL € char saved as Ôé¼

Posted: 31.07.2014, 17:37
by marsupilami
Hello aleroot,

that seems strange. Could you please try to use the latest Version of Zeos 7.1.3 from SVN to see if the problem exists there too? Also you should only have to do

Code: Select all

ZDBase.ClientCodepage:='WIN1252';
Best regards,

Jan

Re: Delphi7 + zeos 7.1.3 + PostgreSQL € char saved as Ôé¼

Posted: 01.08.2014, 11:07
by aleroot
I've tried with the latest version of zeoslib 7.1 in the SVN repository and changing the clientcodepage property as you pointed out, but still the same problem.

Note that I'm using CLX graphic library and that the string is coming from a TEdit .

Re: Delphi7 + zeos 7.1.3 + PostgreSQL € char saved as Ôé¼

Posted: 02.08.2014, 16:47
by EgonHugeist
This is strange indeed. All i can see: The glyph is UTF8 encoded! Don't know anything about your used CLX grphic library.

Could you please try to enter the €-symbol in a normal TDBEdit?
A possible suggestion: Activate TZConnection.AutoEncodeStrings. This is testing all strings you've entered for USASCII/UTF8 and finally ansi encoding. On 7.2 the algorythem is a bit more optimized than the RTL code...

Re: Delphi7 + zeos 7.1.3 + PostgreSQL € char saved as Ôé¼

Posted: 04.08.2014, 23:15
by aleroot
Ok, setting AutoEncodeStrings to True solved the problem ...