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
ZConnection.Properties syntax
Moderators: gto, cipto_kh, EgonHugeist
-
- Senior Boarder
- Posts: 93
- Joined: 01.07.2009, 16:07
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
http://zeos.firmos.at/viewtopic.php?t=2776
on th 6.6 -stable forum, but he didn't get any answer yet
-
- Senior Boarder
- Posts: 93
- Joined: 01.07.2009, 16:07
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
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
-
- Senior Boarder
- Posts: 93
- Joined: 01.07.2009, 16:07
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.
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.