TUniQuery.SQL.Text AND UTF8

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Quido
Posts: 25
Joined: Mon 09 Jan 2006 15:10

TUniQuery.SQL.Text AND UTF8

Post by Quido » Tue 21 Jun 2016 13:33

Hello,

I have problem with text of SQL command with UTF8 characters

- When passing UTF8 characters only by parameters, it's OK.
- When UTF8 characters are placed directly in Text property, they have been lost and question marks are sent to Oracle.

Is it lost by UniDAC, Delphi or Oracle OCI? Have you any idea how send they correctly?

win8, Delphi XE5, UniDAC 5.2.5, Oracle 12 instant client

Code: Select all

SpecificOptions.Values['UseUniCode']      :='True';  // only for data from Oracle
Example of UTF8 characters:
☃ Snowman ☃ U+2603
❄ Snowflake ❄
❅ Tight Snowflake ❅
❆ Heavy Snowflake ❆
... or everything in azbuka like было.

Thanks in advance

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

Re: TUniQuery.SQL.Text AND UTF8

Post by AlexP » Wed 22 Jun 2016 07:54

Hello,

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

Code: Select all

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

Quido
Posts: 25
Joined: Mon 09 Jan 2006 15:10

Re: TUniQuery.SQL.Text AND UTF8

Post by Quido » Wed 22 Jun 2016 10:18

Hello,

I have set specific option 'UnicodeEnvironment' to True but nothing changed - still question marks.

Is it effective in UniDAC 5.2.5?

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

Re: TUniQuery.SQL.Text AND UTF8

Post by AlexP » Fri 24 Jun 2016 07:49

Hello,

You are using an obsolete UniDAC version. Try to reproduce the problem on the latest trial version: https://www.devart.com/unidac/download.html .

Quido
Posts: 25
Joined: Mon 09 Jan 2006 15:10

Re: TUniQuery.SQL.Text AND UTF8

Post by Quido » Tue 12 Jul 2016 11:53

Hello.

I tried UniDAC 6.1.12 and sending UTF8 characters seems OK

Thanks

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

Re: TUniQuery.SQL.Text AND UTF8

Post by AlexP » Tue 12 Jul 2016 12:20

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

Post Reply