Page 1 of 1

Wrong message on error

Posted: 03.02.2015, 14:33
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

Re: Wrong message on error

Posted: 05.02.2015, 09:26
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