Page 1 of 1

UniDac & Unicode (Android) .. Problem !

Posted: Mon 03 May 2021 00:29
by AbdMSultan
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 .

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

Posted: Mon 03 May 2021 02:37
by AbdMSultan
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

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

Posted: Wed 02 Jun 2021 08:59
by Stellar
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

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

Posted: Sun 06 Jun 2021 00:45
by AbdMSultan
Hi Sergey and Thank you
The Field in MSSQLServer 2016 database :
Data Type : VARCHAR(255)
Collation : Arabic_CI_AI ..

Thanks

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

Posted: Sun 06 Jun 2021 00:49
by AbdMSultan

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

Posted: Thu 24 Jun 2021 14:11
by AbdMSultan
Hello ...
Any suggestions, solutions !!

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

Posted: Tue 29 Jun 2021 13:39
by Stellar
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.

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

Posted: Mon 05 Jul 2021 04:28
by AbdMSultan
Thank you so much .. I'm waiting
Regards

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

Posted: Mon 06 Sep 2021 14:50
by Stellar
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

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

Posted: Thu 09 Sep 2021 12:19
by AbdMSultan
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 .

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

Posted: Thu 09 Sep 2021 13:00
by Stellar
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