Subject | Re: How to use Unicode with Firebird??? |
---|---|
Author | kurei_spin |
Post date | 2005-09-08T22:12:10Z |
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!
bye!
--- In firebird-support@yahoogroups.com, "elite705" <kuchinke@i...>
wrote:
removed IB_Cursor and added a IBSQL.
well, thx for helping!
bye!
--- In firebird-support@yahoogroups.com, "elite705" <kuchinke@i...>
wrote:
> --- In firebird-support@yahoogroups.com, "kurei_spin"Firebird
> <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:sending
>
> TNTControls: tntEdit
> IBObjects: IBConnection+IBCursor
> The unicode Unit from Delphi Fundamental
> http://fundementals.sourceforge.net/unicode.html
>
> 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.with
> 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 withUTF8StringToWideString.
> There seems to be some limitations, because 3 Bytes can store morehandle
> than two Bytes. But this only means that Firebird can for sure
> everything that TNTEdit can handle (I hope so :-)). There may besome
> Characters that TNTEdit can't handle.the
> 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.