Problem with UseUnicode and german umlauts, NET-mode only

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
waeberd
Posts: 22
Joined: Tue 09 Nov 2004 06:48

Problem with UseUnicode and german umlauts, NET-mode only

Post by waeberd » Thu 10 Jul 2014 13:43

Hi

using ODAC 9.2.6 on Delphi 2010, I have a problem using special characters in SQL-Queries.

Example:

there is a db-field containig "Logopädie" (with the german 'ä').

The following query returns an empty rowset in NET-Mode (which is wrong):

Code: Select all

select dok_titel from dokument where dok_titel like '%Logopädie%'
In OCI-Mode the same query returns values (which is correct).

The following query returns values in NET-Mode too:

Code: Select all

select dok_titel from dokument where dok_titel like '%Logop'||chr(228)||'die%'
The problem occurs only in NET-Mode and only if UseUnicode = true.

The charset on the Oracle 11 DB is:

Code: Select all

SELECT value$ FROM sys.props$ WHERE name = 'NLS_CHARACTERSET' ;
-> WE8MSWIN1252
Can you help me?

Thanks a lot & best regards

Daniel

waeberd
Posts: 22
Joined: Tue 09 Nov 2004 06:48

Re: Problem with UseUnicode and german umlauts, NET-mode only

Post by waeberd » Fri 11 Jul 2014 06:12

Hi again

simplified queries to demonstrate the problem (in NET-mode):

Code: Select all

-- ORA-00907: missing right parenthesis
select decode ('ä', chr(228), 'correct', 'incorrect') from dual 

-- ORA-00911: invalid character
select decode ('ä', 'ä', 'correct', 'incorrect') from dual 

-- ORA-00907: missing right parenthesis
select decode (chr(228), 'ä', 'correct', 'incorrect') from dual 

-- output "correct"
select decode (chr(228), chr(228), 'correct', 'incorrect') from dual 
In OCI-Mode all 4 queries return "correct" as a result.

Any help appreciated, thanks!

Best regards, Daniel

waeberd
Posts: 22
Joined: Tue 09 Nov 2004 06:48

Re: Problem with UseUnicode and german umlauts, NET-mode only

Post by waeberd » Fri 11 Jul 2014 15:19

Hello forum

just in case: we probably solved the issue!
  • * Updating to 9.3.9
    * Options.UseUnicode := True;
    * Options.UnicodeEnvironment := True;
Best regards, Daniel

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

Re: Problem with UseUnicode and german umlauts, NET-mode only

Post by AlexP » Mon 14 Jul 2014 06:13

Hello,

Glad to see that the issue was resolved. If you have any further questions, feel free to contact us.

martind1
Posts: 17
Joined: Mon 19 Oct 2009 05:15

Re: Problem with UseUnicode and german umlauts, NET-mode only

Post by martind1 » Tue 13 Jan 2015 22:00

using UniDAC V6.0.1 I have the same problem.
please solve this issue for UniDAC too.

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

Re: Problem with UseUnicode and german umlauts, NET-mode only

Post by AlexP » Thu 15 Jan 2015 07:28

Try setting the UseUnicode and UnicodeEnvironment options to true :

Code: Select all

  UniConnection1.SpecificOptions.Values['UseUnicode'] := 'true';
  UniConnection1.SpecificOptions.Values['UnicodeEnvironment'] := 'true';

martind1
Posts: 17
Joined: Mon 19 Oct 2009 05:15

Re: Problem with UseUnicode and german umlauts, NET-mode only

Post by martind1 » Mon 19 Jan 2015 21:03

Hello Alex,

works fine now.

best regards
Martin

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

Re: Problem with UseUnicode and german umlauts, NET-mode only

Post by AlexP » Tue 20 Jan 2015 07:08

You are welcome. Feel free to contact us if you have any further questions.

Post Reply