Ver 6.6.6 stable postgres and UTF8
Posted: 16.04.2010, 17:18
Hi all, I'm using version 6.6.6 stable to connect to a postgres server.
I created a new database using UTF8 as charset.
I created then a table with a character varying field named description.
If I execute a query from pgAdmin III like this:
insert into table_name (description) values ('test accented chars àèìòù.');
the record is stored correctly.
Executing the same query by copying exactly the same text in the SQL.Text property of a TZQuery object I see the following error:
Project Project1.exe raised exception class EZSQLException with message 'SQL Error: ERROR: invalid byte sequence for encoding "UTF8": 0xe0e8ec
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".
Is it a known bug with UTF8 or am I missing something?
I also tried with version 7.0.0 alpha and it raises the same exception.
Thank you very much.
I created a new database using UTF8 as charset.
I created then a table with a character varying field named description.
If I execute a query from pgAdmin III like this:
insert into table_name (description) values ('test accented chars àèìòù.');
the record is stored correctly.
Executing the same query by copying exactly the same text in the SQL.Text property of a TZQuery object I see the following error:
Project Project1.exe raised exception class EZSQLException with message 'SQL Error: ERROR: invalid byte sequence for encoding "UTF8": 0xe0e8ec
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".
Is it a known bug with UTF8 or am I missing something?
I also tried with version 7.0.0 alpha and it raises the same exception.
Thank you very much.