Subject | Re: [firebird-support] Re: How to use Unicode with Firebird??? |
---|---|
Author | David Johnson |
Post date | 2005-09-09T01:28:47Z |
On Thu, 2005-09-08 at 21:32 +0000, kurei_spin wrote:
(3 bytes per character)
create table utf8example (
samplecol varchar(90) CHARSET NONE
)
bytes per character. If you decide to use vogon or ancient egyptian
heiroglyphics, you may need to use 6 bytes per character, but 3 bytes is
satisfactory for supporting all real modern languages.
> you said "Set the size to your expected maximum BYTE count and useFor a UTF8 column that you expect to hold 30 characters, allow 90 bytes
> CHARSET NONE" but I did not understand that... I'm kind of new with
> Firebird, so I don't have a clue where should I set the maximum byte
> count.
(3 bytes per character)
create table utf8example (
samplecol varchar(90) CHARSET NONE
)
>Doesn't matter ... Since you have decided to use UTF-8, allow three
> And there is one other thing: how many bytes have a japanese
> character? where can I find information about it?
>
bytes per character. If you decide to use vogon or ancient egyptian
heiroglyphics, you may need to use 6 bytes per character, but 3 bytes is
satisfactory for supporting all real modern languages.
> --- In firebird-support@yahoogroups.com, David Johnson
> <johnson_d@c...> wrote:
> > 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!
>
>
>
>
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Visit http://firebird.sourceforge.net and click the Resources item
> on the main (top) menu. Try Knowledgebase and FAQ links !
>
> Also search the knowledgebases at http://www.ibphoenix.com
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Yahoo! Groups Links
>
>
>
>
>
>
>