Subject Re: [firebird-support] Re: Unicode
Author David Johnson
asp.net and c# would have the same issue as Delphi with unicode, since
the problem is that the Windows native character set that all three
products are married to is not wide enough to represent the full unicode
code space. Many Chinese characters are beyond the end of the two byte
code space allowed in UCS2.

When you define the character set to NONE, the engine is agnostic
towards the contents of the strings supplied. Corollary is that the
application layer is fully responsible for the byte management of the
stored/retrieved strings.

To support both English and Chinese well in the same database you will
need to move to an environment that natively supports a complete unicode
representation (UTF-8, UTF-32). I switched to Java for my apps for this
and other reasons, but I am sure that there are other platforms that are
just as good. If you are comfortable with c#, then Java would be an
easy switch to make since c# is mostly a knockoff of Java.

On Thu, 2005-03-31 at 03:22 +0000, willie_juson wrote:
>
>
> --- In firebird-support@yahoogroups.com, David Johnson
> <d_johnson@c...> wrote:
> > Recent reviews on this and the Firebird-architect list have
> concluded
> > that the Unicode FSS support is based on an early version of the
> unicode
> > specification that does not match the final documentation, and does
> not
> > reflect any supported standard.
> >
> > I had poor luck saving unicode from Delphi. Others may have had
> more
> > success. The Delphi (UCS2) widestring does not support enough code
> > points to handle the full Unicode specification.
> >
> > However, I have been able to verify that Firebird will correctly
> store
> > and retrieve unicode UTF-8 characters from Java using the jaybird
> JDBC
> > driver, provided the character set of the database/column is set to
> > none. The caveats are that your column size is a byte size, not a
> > character size, and that only byte order collation is meaningful
> from
> > the database. I used arabic, chinese, tibetan, english, and french
> > strings to verify this.
> >
> > On display, if the target system does not have a font configured to
> > represent a code point in the string, the data will be displayed
> as ?'s.
> > Internally, however, it is still represented by the appropriate byte
> > code sequences.
> >
> > Hope this helps!
> >
> > On Wed, 2005-03-30 at 12:49 +0000, willie_juson wrote:
> > >
> > >
> > >
> > > I am writing an ASP.Net app with a Firebird backend database. It
> > > requires multi language (Chinese/English initially) support.
> Could I
> > > please get some guidelines on how to store/retrieve chinese
> (simple)
> > > characters from a database table. To get an understanding of it
> I've
> > > been trying via a Delphi 7 app to populate the table using
> TntWare data
> > > aware controls plus IBConnection/IBQuery/TClientDataset data
> controls.
> > > I can't get it to save chinese characters, as soon as I "post" a
> record
> > > the chinese character become "?"s.
>
>
>
> Thanks David that's a good start, I'll stop banging my head against
> the wall with Delphi and try a different approach.
>
> Maybe via an asp.net page/c#. I'll just make sure I've got this
> right though - I need to define the field(s) in the table(s) as
> having no character set - NONE ?
>
> again thanks for the feedback.
>
>
>
>
>
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>