TOraSession Unicode mode / german umlaut

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
redhair
Posts: 11
Joined: Thu 20 Jun 2013 08:19

TOraSession Unicode mode / german umlaut

Post by redhair » Wed 07 Oct 2015 16:50

Hi ODAC Support Team,

I have a problem with the TOraSession component and its UseUnicode property.
When i execute the following code the result set of the query is empty.
I use the german umlaut 'ä' (Unicode-Number : U+00E4 ) in the WHERE clause of the query.

Code: Select all

	OraSession1->Options->UseUnicode = true;
	OraSession1->Options->Direct = true;
        OraSession1->PerformConnect();
	SmartQuery1->Params->Clear();
	SmartQuery1->SQL->Text = "SELECT * FROM SOE.CUSTOMERS WHERE cust_last_name = 'änglert' ";  // with german umlaut 
	SmartQuery1->Execute();
If i use TNS for connection with my Oracle 11g ( NLS_CHARACTERSET : AL32UTF8, Column CUST_LAST_NAME : Datatype VARCHAR2(40 Bytes) ) i have no problems and my result set is not empty :

Code: Select all

CUSTOMER_ID  CUST_FIRST_NAME  CUST_LAST_NAME                          
187920             leroy            änglert                                 
1 row(s) selected
If i use the Direct mode and set the UseUnicode property to false, i get the same result with one selected row.

Thank you.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: TOraSession Unicode mode / german umlaut

Post by AlexP » Thu 08 Oct 2015 04:32

Hello,

To make such query work, you should set the UseUnicode option and UnicodeEnvironment to True.

Post Reply