Page 1 of 1

UTF8 to Unicode conversion

Posted: Thu 01 Jun 2006 11:31
by kjuelge
Hello,

I recently started using TntWare visual components in order ot display Chinese and other characters in my application. I use ODAC version 5.70.0.29 to connect to our database (which is Oracle 10g R10.2.0.2.0, by the way). The development tool is Borland 2006 for Windows, language is C++.

I set the NLS_LANG setting to GERMAN_GERMANY.ATL32UTF8 for the Oracle client in the registry.

In the application, I set TOraSession.Options.CharLength=0, CharSet=AL32UTF8 and UseUnicode=false.

I can see in the debugger that correct UTF8-encoded strings arrive. I use a TntDBMemo to display a CLOB field from a table. The table is represented by a TOraTable object. The dataset property of the TntDBMemo is set to this object.

The problem is now that the TntDBMemo displays the UTF8 string as it is. It is not decoded and converted to a WideString. I thought someone along the line (either ODAC or TntWare) has to do the conversion. I can do it myself (which works fine), but that would defeat the purpose of data-sensitive components because I have to update the string everytime a record is modified or the dataset switches to the next record.

Am I missing something here? Help would be greatly appreciated.

Posted: Thu 01 Jun 2006 12:32
by Challenger
You can set Options.UseUnicode property of TOraSession component to True. In this case all character data is stored as WideStrings, and TStringField is replaced with TWideStringField. Also you should set Options.CharLength to 0 and Options.Charset to empty string.

Posted: Thu 01 Jun 2006 12:36
by kjuelge
Ok. I tried exactly that.

Now Chinese characters are displayed as ??????.

Posted: Mon 05 Jun 2006 08:01
by Alex
We cannot reproduce this problem. Please tell us do you use client to connect to Oracle or you connect using Net option.
Check if East Asian languages are installed on your computer. (Go to Control Panel\Regional and Language Options, Languages tab. "Install files for East Asian languages" must be checked.)
If it is possible send to ODAC support address a sample that demonstrates the problem.