Subject Re: How to use Unicode with Firebird???
Author kurei_spin
Hi! The Code you posted worked for me even using IBX. I've just
removed IB_Cursor and added a IBSQL.

well, thx for helping!


--- In, "elite705" <kuchinke@i...>
> --- In, "kurei_spin"
> <kurei_spin@y...> wrote:
> > Hi! I'm having a little problem trying to use Unicode on Firebird
> > 1.5.
> Hi!
> I have succesfully stored and received Russian Characters in
> in a UNICODE_FSS Column. I used following components:
> TNTControls: tntEdit
> IBObjects: IBConnection+IBCursor
> The unicode Unit from Delphi Fundamental
> The charset in the IBConnection Component is UNICODE_FSS.
> For writing Unicode to Firebird:
> with IB_Cursor1 do
> begin
> paramByName('UnicodeText').AsString :=
> WideStringToUTF8String(tntEdit1.Text);
> execute;
> end;
> The SQL is:
> INSERT INTO Test(UnicodeText)
> VALUES(:UnicodeText)
> Reading Unicode from Firebird:
> tntEdit1.Text :=
> UTF8StringToWideString(fieldByName('UnicodeText').AsString)
> I am not sure about the following, because I am relativ new to the
> Unicode-Delphi-Firebird Problem. I have not tested it, except
> a few russian characters to and from Firebird.
> The problem with TNTEdit and Firebird is, that TNTEdit uses the
> Windows (Delphi?) Unitcode (2 Bytes), Firebird uses 3 Bytes UTF8 or
> something very similar.
> So you have to Convert from Windows Unicode to Firebird Unicode
> WideStringToUTF8String und the other way with
> There seems to be some limitations, because 3 Bytes can store more
> than two Bytes. But this only means that Firebird can for sure
> everything that TNTEdit can handle (I hope so :-)). There may be
> Characters that TNTEdit can't handle.
> Please report how the solution is working for your japanese
> characters. In the moment I need only support for russian, but in
> future this may be extended. So I would like to know, if there are
> some problems with this.