Page 1 of 1

TUniQuery.SQL.Text AND UTF8

Posted: Tue 21 Jun 2016 13:33
by Quido
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

Re: TUniQuery.SQL.Text AND UTF8

Posted: Wed 22 Jun 2016 07:54
by AlexP
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';

Re: TUniQuery.SQL.Text AND UTF8

Posted: Wed 22 Jun 2016 10:18
by Quido
Hello,

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

Is it effective in UniDAC 5.2.5?

Re: TUniQuery.SQL.Text AND UTF8

Posted: Fri 24 Jun 2016 07:49
by AlexP
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 .

Re: TUniQuery.SQL.Text AND UTF8

Posted: Tue 12 Jul 2016 11:53
by Quido
Hello.

I tried UniDAC 6.1.12 and sending UTF8 characters seems OK

Thanks

Re: TUniQuery.SQL.Text AND UTF8

Posted: Tue 12 Jul 2016 12:20
by AlexP
Glad to see that the issue was resolved. If you have any further questions, feel free to contact us.