Unicode in D2009 TDBGrid problem

Discussion of open issues, suggestions and bugs regarding IBDAC (InterBase Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Roaster2
Posts: 51
Joined: Mon 13 Oct 2008 19:29

Unicode in D2009 TDBGrid problem

Post by Roaster2 » Mon 13 Oct 2008 20:45

Hi

currently I'm evaluating IBDac 2.70.0.40, using Delphi 2009 Pro and have got an issue within a TDBGrid with a Firebird 2.1 database.

I've created a new form, placed a TIBConnection component on it, set up the option Charset := UTF8, UseUnicode := True.

I've placed a TIBCTable, a TIBCDataSource and a TDBGrid on the form.

The database just contains one table with two fields (for testing purposes). Each field is created with UTF8.

I've started the application from the IDE, added a new record in the grid and inserted some Chinese characters in both fields. This works very well.

When leaving the application and return to the IDE, I don't see those Chinese characters any more (of course the connection is still active). The grid just shows some '????' instead. ANSI characters seem to work well, in the IDE and during run time.

When running the application again, I get the Chinese text again.

So what did I made wrong?

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Tue 14 Oct 2008 13:21

Maybe you have set the UseUnicode option after opening the TIBCTable component. So the option does not take effect.

Try to close TIBCTable and TIBCConnection components and open them again.

Roaster2
Posts: 51
Joined: Mon 13 Oct 2008 19:29

Post by Roaster2 » Tue 14 Oct 2008 15:02

Thanks for reply.

I've set all properties in the IDE using the Object Inspector. So far I did not write one line of code.

Just placed the appropriate components on the form set the database connection to active and run the application from the IDE.

I've use the TDBNavigator to insert a new record, put in some Chinese characters and saved (using the navigator). While running the application I can see those Unicode characters. When returning to the IDE (the table is still open) I see those mentioned '????'.

Anyway I will check your suggestion again.

Roaster2
Posts: 51
Joined: Mon 13 Oct 2008 19:29

Post by Roaster2 » Tue 14 Oct 2008 16:36

Hm, it seems for some reasons, that this issue went away! I've booted my VM with D2009, started the IDE and loaded the test project with IBDac.

Immediately after the IDE showed the grid, I could see the Chinese characters, as expected. It seems that you were right when assuming that I've set the UseUnicode property after opening the table.

I guess however restarting the IDE would have shown the same results before.
Thanks for your help!

Is there already a date when the full version will come out?

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Wed 15 Oct 2008 06:48

We are planning to release IBDAC on the next week.

Post Reply