Subject Re: [firebird-support] How to use Unicode with Firebird???
Author David Johnson
On Mon, 2005-09-05 at 13:36 +0000, kurei_spin wrote:
> Hi! I'm having a little problem trying to use Unicode on Firebird
> 1.5.
> I'm trying to store in a Firebird 1.5 database words with japanese
> characters. In order to visualize japanese characters i'm using
> TntUnicode Controls (http://www.tntware.com/delphicontrols/unicode).
> I
> comes with a tntDBEdit. I've created my FB Database with UNICODE_FSS
> character set. I've created my table with the same character set. So
> when I write the japanese characters everything is OK. When I post
> the
> registry the Text of TntDBEdit changes to "?". What am I doing wrong?
>
> 1) Is UNICODE_FSS the correct character set?
> Ps.: I've tried SJIS_0208 and EUCJ_0208 too but still don't
> work...

Yes, but ....

There are known issues with all multi-byte character sets in FB 1.x.
Those are corrected in FB2.

Set the size to your expected maximum BYTE count and use CHARSET NONE as
a workaround. Be aware that this puts the onus for collation (other
than strict binary) on the application.

> 2) What is the correct type of field to receive this characters?
> Varchar or blob? I already tried both but still don't work.

Both should work. I tested my workaround in VARCHAR columns with
chinese, hindi, and arabic character sets.

> 3) What's the best acess component for using unicode? I'm using IBX
> (IBDatabase + IBDataSet). I wonder if they can work with UNICODE...
> Maybe not... In that case, what components should I use?
>

If you're not committed to Delphi, check out Java with SWT. :o)


> Thx for helping!
>
> bye!

good luck!