How can ODAC support unicode

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Samuel

How can ODAC support unicode

Post by Samuel » Fri 07 Jul 2006 02:28

I am using ODAC 5.5 for delphi 7. My application needs to display some chinese character so I need to make it support unicode. I have set the OraSession's UseUnicode property to true. The field in the OraQuery is TWideStringField. But when I get the data from the database, the return value is still "?". My database's character set is unicode. Are there anything else I need to set? Thanks for anyone's help.

Samuel

Post by Samuel » Mon 10 Jul 2006 08:59

Could anyone help me? I have tried to use the TNT component to display the unicode character. Most of the character can be displayed, but some words like "蒳" is displayed as a "?". I can type the "蒳" in the TNT editor, but when I load it from the DB, it is displayed as a "?"

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

Post by Plash » Mon 10 Jul 2006 14:32

Please specify type of the field in the database table and whether you use Net option to connect to database. Also specify full version of ODAC including build number (see Odac\About ODAC in Delphi menu).

Samuel

Post by Samuel » Tue 11 Jul 2006 01:59

The field type is VARCHAR2 in the DB (Oracle 9i) and is TWideStringField in the delphi 7. My ODAC version is 5.50.0.17. I have set the net option to true. I have no problem on the connection. I can successfully connect to the DB. I have set the UseUnicode option property of the TOraSession to true. I also try to set the Charset property to UTF8, but it still cannot display the character "蒳" correctly. If I type the "蒳" in the TntDbEdit control and post it back to the DB. The word is correctly write back to the DB. I can successfully display the word "蒳" from another web application that support unicode. But while I try to refresh the dataset in my delphi application, it gets a "?" instead of "蒳". Thanks for help.

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

Post by Plash » Tue 11 Jul 2006 12:12

This problem is fixed in new versions of ODAC. You should upgrade your ODAC to work with Unicode correctly.

Samuel

Post by Samuel » Mon 17 Jul 2006 02:23

How can I upgrade my ODAC?

Challenger
Devart Team
Posts: 925
Joined: Thu 17 Nov 2005 10:53

Post by Challenger » Mon 17 Jul 2006 08:45

You can download the latest build of ODAC using link you've recived upon registration.

Post Reply