Postgres 9.2 UTF: single quote posted as '\047'

In this forum we will discuss things relating the ZEOSLib 6.6.x stable versions

Moderators: gto, EgonHugeist

Post Reply
gmb
Fresh Boarder
Fresh Boarder
Posts: 18
Joined: 19.05.2008, 14:05

Postgres 9.2 UTF: single quote posted as '\047'

Post by gmb »

Apologies, I know there are many posts out there on this subject, but tried a lot of the suggestions and still cannot get this right. If someone can point me in the right direction, I'll appreciate it a lot.

I'm using Delphi6, ZEOS v 6.6.6, PostgreSQL 9.2 (DB encoding = UTF8)
Posting a string value to a TEXT field; when the string contains single quotes ('), it is posted as '\047' on the table.

I've seen people referring to TZconnection's EscapeString function which handles all necessary escaping for you, but I understand this is only available from Zeos v7 and I'm stuck on Delphi 6 (which Zeos v7 sadly does not cater for).

I've tried playing around with client_encoding, but this seems to have no effect.

Any help will be appreciated.
Post Reply