UniDac & Unicode (Android) .. Problem !

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
AbdMSultan
Posts: 8
Joined: Mon 03 May 2021 00:09

UniDac & Unicode (Android) .. Problem !

Post by AbdMSultan » Mon 03 May 2021 00:29

Good Morning.
we use UniDac 8.4.1 in our Co. for work ..
So we test it for
Delphi 10.2.3 Tokyo Firemonkey
Delphi 10.3.3 Rio Firemonkey
Delphi 10.4.2 Sydney Firemonkey
----------
MS SQL 2016
All Fields which have Arabic characters come as questionmarks "??????" ..
Is there a parameter as "Use Unicode" ..
What can I do to solve this issue ..
Thank you so much
Regards .
Last edited by AbdMSultan on Thu 05 Aug 2021 23:04, edited 1 time in total.

AbdMSultan
Posts: 8
Joined: Mon 03 May 2021 00:09

Re: UniDac & Unicode (Android) .. Problem !

Post by AbdMSultan » Mon 03 May 2021 02:37

Delphi 10.2.3 Tokyo Firemonkey
Delphi 10.3.3 Rio Firemonkey
Delphi 10.4.2 Sydney Firemonkey
----------
The problem with unicode texts appears with android applications ..

----------
Thanks
Last edited by AbdMSultan on Thu 05 Aug 2021 23:04, edited 1 time in total.

Stellar
Devart Team
Posts: 496
Joined: Tue 03 Oct 2017 11:00

Re: UniDac & Unicode (Android) .. Problem !

Post by Stellar » Wed 02 Jun 2021 08:59

Hi there,

Thanks for provided info.

In order to investigate the issue on our environment, can you please clarify which data type and collation are set for database field?

Regards,
Sergey

AbdMSultan
Posts: 8
Joined: Mon 03 May 2021 00:09

Re: UniDac & Unicode (Android) .. Problem !

Post by AbdMSultan » Sun 06 Jun 2021 00:45

Hi Sergey and Thank you
The Field in MSSQLServer 2016 database :
Data Type : VARCHAR(255)
Collation : Arabic_CI_AI ..

Thanks
Last edited by AbdMSultan on Thu 05 Aug 2021 23:03, edited 1 time in total.


AbdMSultan
Posts: 8
Joined: Mon 03 May 2021 00:09

Re: UniDac & Unicode (Android) .. Problem !

Post by AbdMSultan » Thu 24 Jun 2021 14:11

Hello ...
Any suggestions, solutions !!

Stellar
Devart Team
Posts: 496
Joined: Tue 03 Oct 2017 11:00

Re: UniDac & Unicode (Android) .. Problem !

Post by Stellar » Tue 29 Jun 2021 13:39

Thank you for providing the information. We've reproduced the issue and started to investigate possible causes of the described behavior. We will let you know the results as soon as we get them.

AbdMSultan
Posts: 8
Joined: Mon 03 May 2021 00:09

Re: UniDac & Unicode (Android) .. Problem !

Post by AbdMSultan » Mon 05 Jul 2021 04:28

Thank you so much .. I'm waiting
Regards

Stellar
Devart Team
Posts: 496
Joined: Tue 03 Oct 2017 11:00

Re: UniDac & Unicode (Android) .. Problem !

Post by Stellar » Mon 06 Sep 2021 14:50

Hi there,

Issues with codding may appear on devices where the Arabian language is set, however, you may try converting strings to unicode.

For this you can use DataTypeMapping, this is a special mechanism provided by our components. To set the mapping for a field, you can use the design time editor of the TMSQuery component (or globally in TMSConnection) on the Data type mapping tab you need to add rules:

Code: Select all

Database Type = Char
Field Type = WideString

Database Type = Varchar
Field Type = WideString

Database Type = Text
Field Type = WideMemo
The type mapping rule can also be set programmatically, for example:

Code: Select all

uses
  MSDataTypeMap;

...

UniConnection1.DataTypeMap.AddDBTypeRule(msChar, ftWideString, True);
UniConnection1.DataTypeMap.AddDBTypeRule(msVarchar, ftWideString, True);
UniConnection1.DataTypeMap.AddDBTypeRule(msText, ftWideMemo, True);
UniConnection1.Connect;
Regards,
Sergey

AbdMSultan
Posts: 8
Joined: Mon 03 May 2021 00:09

Re: UniDac & Unicode (Android) .. Problem ! (Solved)

Post by AbdMSultan » Thu 09 Sep 2021 12:19

Thank you very much, Mr. Sergey
I tried both solutions..the problem is completely resolved
But in the programming method, I wrote in uses

Code: Select all

uses
  MSDataTypeMapUni;
So Thank you so much again ..
Regards .

Stellar
Devart Team
Posts: 496
Joined: Tue 03 Oct 2017 11:00

Re: UniDac & Unicode (Android) .. Problem !

Post by Stellar » Thu 09 Sep 2021 13:00

Hi,

Thank you for your reply! I was happy to assist you!
In case you have any further questions about our products, please feel free to contact us any time!

Regards,
Sergey

Post Reply