Ver 6.6.6 stable postgres and UTF8

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

Moderators: gto, EgonHugeist

Post Reply
Brekko
Fresh Boarder
Fresh Boarder
Posts: 1
Joined: 16.04.2010, 16:53

Ver 6.6.6 stable postgres and UTF8

Post by Brekko »

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.
olivdaum
Fresh Boarder
Fresh Boarder
Posts: 8
Joined: 11.05.2010, 12:53
Location: France

Post by olivdaum »

Visibly, every body have this problem, but not ZeosLib development team, neither developers who don't work with UTF8.

What a disappointment ! Those components are powerfull and bugless than PostgresDAC components in my applications. :(

When a european developper integrate team ?
:lol:
seawolf
Zeos Dev Team *
Zeos Dev Team *
Posts: 385
Joined: 04.06.2008, 19:50
Contact:

Post by seawolf »

Please check that server and client have the same encoding

Set TZConnection.Options adding
codepage=utf8
client_encoding=utf8

Remember Zeos 6.x does not support utf8
Zeos 7.x support utf8, but at the moment is on alpha stage, so you could encounter problems.
olivdaum
Fresh Boarder
Fresh Boarder
Posts: 8
Joined: 11.05.2010, 12:53
Location: France

Post by olivdaum »

Yes, but that doesn't work ! :wallb:
seawolf
Zeos Dev Team *
Zeos Dev Team *
Posts: 385
Joined: 04.06.2008, 19:50
Contact:

Post by seawolf »

It works only for Delphi 2009 -2010 (maybe Lazarus, but i'm not sure) and Zeos 7
olivdaum
Fresh Boarder
Fresh Boarder
Posts: 8
Joined: 11.05.2010, 12:53
Location: France

Post by olivdaum »

Finally ! Here is the explanation :hiding:
guidoaerts
Senior Boarder
Senior Boarder
Posts: 93
Joined: 01.07.2009, 16:07

Post by guidoaerts »

utf8 works with zeos6.6.5-stable, firebird 2.1 and lazarus0.9.26.2
olivdaum
Fresh Boarder
Fresh Boarder
Posts: 8
Joined: 11.05.2010, 12:53
Location: France

Post by olivdaum »

:sorry:
I don't believe you !
seawolf
Zeos Dev Team *
Zeos Dev Team *
Posts: 385
Joined: 04.06.2008, 19:50
Contact:

Post by seawolf »

Me too, first of all because Zeos 6.x uses Ansi functions,
and Fb, starting from the upcoming 2.5 has a better codepages support
guidoaerts
Senior Boarder
Senior Boarder
Posts: 93
Joined: 01.07.2009, 16:07

Post by guidoaerts »

at least I think it's working, I have it up and running. had some troubles getting it on the rails (http://zeos.firmos.at/viewtopic.php?t=2779), but up to now it seems ok. for now just running on the xp pc on which i work, might fail when distributing. will keep you posted.

take a look here :
http://zeos.firmos.at/viewtopic.php?t=1 ... 8862bc2a22
Post Reply