Encoding Arabic Texts

I use Get text to get a Arabic text from a website. When I msg box it, appears correctly.
But then When I try to insert the same Arabic text to database using Execute Non query it is done correctly. But in the database when i query back it is not properly inserted.
It appears as “??? ??? ???” .Kindly help with this.


some details to the used datatabase could help to sort it out. A first analysis check would be the to which collation / encoding the datatable is set.

Hi @ppr ,

Thanks for replying.
The Database - Oracle SQL dev
Regarding the character sets
The above character set is used in the database.
I get the arabic text correctly using uipath but while inserting using query it is done.But while I see in SQL it is '???" .I can’t see the arabic text

maybe for analyis reasons the string from get text can be converted into another encoding and the converted text is used for storing into the datatable.

maybe this one: 28596, iso-8859-6 Arabic (ISO)

On the first look it looks like a encoding issue. But there also a few things which can influence the tests e.g.

here it is unclear what is done…

However give a first try on changing the encoding as mentioned above


I actually did this encoding but am not sure what is the correct syntax I shud give in the assign activity.
The variable I get as output from get text is - ara_text.
Could you pls give me the correct encoding conversation syntax?

do a start similar as:

Encoding senc= Encoding.GetEncoding(YourSourceEncoding)
Encoding denc= System.Text.Encoding.GetEncoding("iso-8859-6")
byte[] sBytes = senc.GetBytes(Message)
byte[] dBytes = Encoding.Convert(denc, senc, sBytes)
string msg = denc.GetString(dBytes)

the Source Encoding maybe is triggered by your machine. Lets try to get it with:
System: System.Text.Encoding.Default
.Net Intern: System.Text.Encoding.Unicode

I tried this - System.Text.Encoding.Convert(System.Text.Encoding.GetEncoding(“iso-8859-6”),System.Text.Encoding.Default,system.Text.Encoding.utf8.GetBytes(COMPANY_ARA))
But getting error if i assign this value to a string.

I tried the encoding but it ain’t working.


currently we do see a missmatch between your code line and the sample lines.

For a fully analysis if the conversion is not fixing the issue, then at least it should be further researched:

  • get text, Convert to AR encoding, write this text to a text file and check if the character encoding was correctly applied

  • if text was correctly applied then used it for e.g. inserts with SQL Statement

  • in case of it is failing again, then check what the DB driver is setting / is expecting on character encodings. The driver itself could jump out of the defined / foreseen character encodings and is to count on the components which are to check.

Hey @ppr
How to convert to AR Encoding? Could you pls help me with that.


refer to post from above

@ppr ,
How to declare bytes in uipath or the equavalent varaiable datatype?
If i assign system.text.encoding.default to a string it throws error.
Kindly help,


for the encoding datatype:

thanks @ppr ,
Can you tell me how to give this line in uipath?
byte sBytes = senc.GetBytes(Message)
I created a byte string called sBytes and assigned value as sourceEnc.GetBytes(ARA_TEXT)…but getting error like object reference not set to instence of object

maybe this visual helps

thanks @ppr ,
It shows me the exact text correctly even after applying encoding…But still after inserting it goes as ???.

Do I have to configure NLS_LANG or something like that?


as mentioned above there are some more factors (eg. database driver to check) . Yes NLS_LANG can influence.

So what should I do with NLS_LANG.
there is not a parameter called as nls_lang in my client system which has uipath.I tried adding too and running in uipath but that too failed.
Any idea on this?

before continueing this ping-pong in seconds,

  • just share all details like implemented flow, sample text …
  • do not let remain open questions e.g.

try to some additional researches by your own as well


@ppr ,
details - the arabic text is from KSA(saudi arabia)
as you said I have done encoding too - which gives the same result
I just want to insert into oracle using the general insert query for oracle.
For sample text you can have any arabic text for example.