Wrong message on error

The official tester's forum for ZeosLib 7.1. Ask for help, post proposals or solutions.
Post Reply
User avatar
aebi
Fresh Boarder
Fresh Boarder
Posts: 24
Joined: 02.05.2006, 10:26

Wrong message on error

Post by aebi »

Hello,

I'm using Zeos 7.1.4 stable with Delphi XE 7 and Postgres 9.4; when there is an error (SQL-Syntax or other), I always get ' "SQL Error: ERROR: character with byte sequence ... in encoding "UTF8" has no equivalent in encoding "LATIN1" '.
The message is generated by "TZPostgreSQLBaseDriver.GetErrorMessage", which (as far as I understand) calls "PQerrorMessage" from the Postrges-library.
The same SQL-statement in "pgAdmin" generates (for example) "Syntaxerror at WHERE, Line ..."

Maybe I'm doing something wrong - any help would be helpfull !

Thanks
Andreas
User avatar
aebi
Fresh Boarder
Fresh Boarder
Posts: 24
Joined: 02.05.2006, 10:26

Re: Wrong message on error

Post by aebi »

Hello (again),

after doing some experiments with "direct" access (using "PGconnect" etc. from libpq.dll) I was able to get the right error-message:
after changing "client_encoding" from "LATIN1" to "UTF-8" the correct message is displayed. :oops:
I'm wondering, why my data (which also has non-ASCII-characters) was stored/read in the right way...

with best regards
Andreas
Post Reply