I'm using Zeos 6.6.6
Before connecting, I'm setting the connection properties like that
Code: Select all
ZConn.Properties.Values['codepage']:='UTF8';
ZConn.Properties.Values['client_encoding']:='UTF8'; //
now, when I execute a SQL Query, I got the following error:
Code: Select all
exception message : SQL Error: ERROR: invalid byte sequence for encoding "UTF8": 0xe46c6c HINT: This error can also happen if the byte sequence does not match the encoding expected by the server, which is controlled by "client_encoding".
ok, so I try to do it myself using the following pseudo code:
Code: Select all
Query.sql.text := UTF8Encode(sql);
For some internal reasons, I have to use the folowing sql statements looking like:
Code: Select all
SELECT field1 AS "Field Caption" FROM xxxx
Code: Select all
Query.Fieldbyname('Field caption')
Code: Select all
Query.fieldbyname(UTF8Encode('field caption'))
But is there any way to let Zeos handle all the UTF8 conversion?
Or do I really need to change all my code to do it ?