ZConnection.Properties syntax

Forum related to Firebird

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
guidoaerts
Senior Boarder
Senior Boarder
Posts: 93
Joined: 01.07.2009, 16:07

ZConnection.Properties syntax

Post by guidoaerts »

Hello all,
Can anyone tell me what is the right way to set a character set (and eventually collation order) for the connection with a firebird database?

Guido
guidoaerts
Senior Boarder
Senior Boarder
Posts: 93
Joined: 01.07.2009, 16:07

Post by guidoaerts »

Woolfik used 'codepage = ... ' in
http://zeos.firmos.at/viewtopic.php?t=2776
on th 6.6 -stable forum, but he didn't get any answer yet
guidoaerts
Senior Boarder
Senior Boarder
Posts: 93
Joined: 01.07.2009, 16:07

Post by guidoaerts »

I work on win XP, lazarus 0.9.26.2, zeos 6.6.5 stable, firebird 2.1.2
my database is in utf8, xp and lazarus work in utf8, I have 'codepage=utf8' in ZConnection.properties, still my dbgrid show an empty string for fields that contain non ascii chars, like 'é'.
What's wrong? Any caption that I fill with AnsiToUTF8(fieldbyname('xx').asstring) will display properly. Is dbgrid in Ansi by default? and how can I change it to display utf8?
Desperate,
Guido
guidoaerts
Senior Boarder
Senior Boarder
Posts: 93
Joined: 01.07.2009, 16:07

Post by guidoaerts »

Ok, for those who are interested..
Seems that even if firebird database is in utf8, it accepts anything. I copied data from a firebird database with default character set=none to one with default character set = utf8 using OpenOffice odbc. I was thinking, as openoffice works with unicode, now the data in my new database would be in utf8. Not true.
I had to get all the stringfields from the old database, convert the contents to utf8 using AnsiToUTF8() and update the new database.
Now everything works fine.
Post Reply