UTF8 to Unicode conversion
Posted: Thu 01 Jun 2006 11:31
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.
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.