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

The official tester's forum for ZeosLib 7.1. Ask for help, post proposals or solutions.
Post Reply
aleroot
Fresh Boarder
Fresh Boarder
Posts: 13
Joined: 21.02.2013, 22:27

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

Post 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 .
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1939
Joined: 17.01.2011, 14:17

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

Post 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
aleroot
Fresh Boarder
Fresh Boarder
Posts: 13
Joined: 21.02.2013, 22:27

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

Post 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 .
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

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

Post 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...
Best regards, Michael

You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image
aleroot
Fresh Boarder
Fresh Boarder
Posts: 13
Joined: 21.02.2013, 22:27

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

Post by aleroot »

Ok, setting AutoEncodeStrings to True solved the problem ...
Post Reply