Page 2 of 2

Posted: 29.09.2011, 15:49
by marsupilami
No, I say have a database that is Unicode (UTF8) and an application that is Delphi 7 + Zeos 6, which is ANSI, which uses codepages. Add the CODEPAGE=xxx parameter to your connection object - depending on the locale settings of windows. You could the codepage from an ini file or try to determine it programmatically -> GetACP() is your friend, I think.
Once Zeos 7 is available, you probably can change easily to Delphi XE and have a full unicode solution then, without having to worry about your database.
I think this is the safest way.

If you are really determined about a full unicode solution there might be two other ways.
First: Others have had a problem similar to yours. Check http://zeos.firmos.at/viewtopic.php?t=3297. The solution seems to be generic and might help you getting this to work with firebird too.

Second: If this doesn't work, then you might want to take a look at Lazarus + Zeos 6. Set CODEPAGE=UTF8 there and you should be fine. But have a look at the specifics about character sets in this environment at http://wiki.lazarus.freepascal.org/LCL_Unicode_Support.

I hope that helps,

Jan

Posted: 30.09.2011, 08:15
by delphidreamer
All do I did tread this topic i found no solution in it but there is a link to a solution i will try

http://zeos.firmos.at/viewtopic.php?t=3124

So thanks Jan :-).
I will need a conversion tool anyway as older databases haver no codepage but if this works I am a very happy man.
I can finally use my new tools for my main job and there's many features in D XE that are not in D 7.

Posted: 30.09.2011, 14:08
by delphidreamer
I can see that with utf8 the ecoding works for äé etc but not for russian.

It just that i saw the IBComponents do the job on firebird with FSS_UNICODE
There i could enter russian greek and Dutch in one string.
So im sure this must be the route for a multilang one day. Maby that day is just not today.

Posted: 01.10.2011, 00:42
by marsupilami
Hello Delphidreamer,

the case did not let me sleep. It seems that the DBC-Driver for Interbase and firebird did not always return the correct string type. I have created a patch that lets me save normal latin letters, russian letters and even chinese words in one field. The patch is created against zeos7-trunk (https://zeoslib.svn.sourceforge.net/svn ... slib/trunk)using TortoiseSVN. No other changes are required. If you use this patch you have to set CODEPAGE=UTF8 in the ZConnection.Properties.

I don't know if this works correctly with Delphi 7 because I have no Delphi 7 installed.
I hope this works as it has cost me the better part of the night.

Jan

PS: If it works and you feel grateful enough that you want to give me money just contact me ;)

Posted: 06.10.2011, 18:07
by delphidreamer
Ok downloaded revision 943 and applied patch i will get back with the results.
Thanks for spending some time at it :-)
I will make sure you get paid if it does what I needed.

Posted: 18.10.2011, 18:49
by frla
Hmm.. it works if I use a DBMemo but when I use Developer Express controls (Grid + their DBMemom) it doesn't work. Do they send the text to the table in a different format perhaps?

I tried with standard dbedit earlier so the patch seems to fix something...

EDIT: Sorry, answered to this instead of a similar post I started..

Posted: 15.03.2012, 11:02
by EgonHugeist
try this one:

http://zeos.firmos.at/viewtopic.php?t=3427

Its completed.. So pay me!!! :piratecap:

best regards

EgonHugeist