Subject Re: [IBO] Again: Unicode
Author mircostange
--- In IBObjects@yahoogroups.com, Helen Borrie <helebor@t...> wrote:
> At 02:26 PM 22/10/2004 +0000, you wrote:
>
>
> >I am still in the situation of finding out, whether it is possible
> >to migrate my existing Delphi/IBO application to unicode support.
> >Some information has been here in the group, but I simply don't
get
> >anything to work.
> >
> >I created a sample database with default charset none and created
> >the following table:
> >
> >CREATE TABLE PERSON
> >(
> > PERSONID INTEGER NOT NULL,
> > FIRSTNAME CHAR( 40) CHARACTER SET
UNICODE_FSS
> >NOT NULL COLLATE UNICODE_FSS,
> > LASTNAME CHAR( 40) CHARACTER SET
UNICODE_FSS
> >NOT NULL COLLATE UNICODE_FSS,
> > GENDER CHAR( 10) NOT NULL COLLATE NONE,
> > AGE SMALLINT,
> > CONSTRAINT PK_PERSON PRIMARY KEY (PERSONID)
> >);
> >
> >firstName and lastName should support unicode, while gender
doesn't
> >need this.
> >
> >I then tried to write a small Delphi app to connect to the db as
> >follows:
> >-created an IB_Connection
> >-created an IB_Query with "select * from person" and auto-
generated
> >update sql
> >-created an IB_Datasource, bound to IB_Query
> >-dropped an IB_Grid to show the data
> >
> >Result: everything is fine, but entering unicode (japanese,
> >cyrillic, ...) results in "???"
> >It seems, the IBO controls don't support Unicode, because the
> >default Delphi controls don't.
> >
> >I then tried the following:
> >- use IBOQuery with same select
> >- use standard Delphi TDataset
> >- bind standard Delphi grid (don't expect this to show Unicode
just
> >for navigation)
> >- download, install and bind TNT Edit box with unicode support
> >- set font to Tahoma (otherwise it won't show properly)
> >
> >Result: everything is find, I can enter unicode chars into the
edit
> >box, moving to the next record and back shows "???" .... arghh..
> >
> >Has anyone got anything to run with Unicode+Firebird+IBObjects?
> >What am I doing wrong here? What could I do or contribute to make
it
> >work? Who can help? Please....
>
> Notice, if the TNT edit is displaying "correct" characters as you
enter
> them, then Delphi is capable of interpreting them.
>
The TNT displays them correctly while entering them. Only after
moving to a different record and back "corrupts" the data.

> Don't get into the complication of wide strings unless you find
you
> must.

It seems I must. The requirements for the new version are: one
software that supports English/US, European languages, China, Japan.
I will however try to understand whether I could simply switch
between different databases instead.


I will continue to work on this. Anyone contributing to this issue
is welcome. I would be pleased to get replies to the detail
questions I will come up with.

A side question: is there a disadvantage of using the
TDataset/IBOQuery combination with normal Delphi controls as opposed
to the IB_Query/IB_Dataset combination? Slower? fewer features?
Restricted?