character transliteration for blobs

Forum related to Firebird

Moderators: gto, cipto_kh, EgonHugeist

marsupilami
Gold Boarder
Gold Boarder
Posts: 588
Joined: 17.01.2011, 14:17

Postby marsupilami » 29.09.2011, 15:49

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

delphidreamer
Fresh Boarder
Fresh Boarder
Posts: 6
Joined: 26.09.2011, 12:27

Postby delphidreamer » 30.09.2011, 08:15

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.

delphidreamer
Fresh Boarder
Fresh Boarder
Posts: 6
Joined: 26.09.2011, 12:27

Postby delphidreamer » 30.09.2011, 14:08

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.

marsupilami
Gold Boarder
Gold Boarder
Posts: 588
Joined: 17.01.2011, 14:17

Postby marsupilami » 01.10.2011, 00:42

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/svnroot/zeoslib/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 ;)
You do not have the required permissions to view the files attached to this post.

delphidreamer
Fresh Boarder
Fresh Boarder
Posts: 6
Joined: 26.09.2011, 12:27

Postby delphidreamer » 06.10.2011, 18:07

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.

frla
Fresh Boarder
Fresh Boarder
Posts: 4
Joined: 11.10.2011, 19:22

Postby frla » 18.10.2011, 18:49

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..

User avatar
EgonHugeist
Zeos Dev Team
Zeos Dev Team
Posts: 1701
Joined: 31.03.2011, 22:38

Postby EgonHugeist » 15.03.2012, 11:02

try this one:

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

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

best regards

EgonHugeist
King regards, Michael

You want to help? viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image


Return to “Firebird”

Who is online

Users browsing this forum: No registered users and 1 guest