Base64 to UTF-8 String decoding- Arabic Text

asp.net, base64, c#, utf-8

Solution

After searching for few days. I came up with this and is working..

byte[] plain = Convert.FromBase64String(data);
Encoding iso = Encoding.GetEncoding("ISO-8859-6");
newData = iso.GetString(plain);
return newData;

Problem

I'm trying to decode an Base64 data which contains a mixture of English and Arabic characters. I'm using the following code to decode. ``` var bytes = Convert.FromBase64String(data); //data contains base64 data string text = Encoding.UTF8.GetString(bytes); ``` After decoding I'm displaying it on the ASP page. My problem here is, English text is displayed properly whereas in place of arabic text i'm getting empty boxes and question marks like this. ����� ��� Please suggest where i'm going wrong.

Original source