split Arabic sentence to letters and keep Diacritics

Viewed 29

I have Arabic sentence written with diacritics: "مَرْحَبَا كَيْفَ حَالُك".
I want to split it to letters, so I used this code:

string text = "مَرْحَبَا كَيْفَ حَالُك";

char[] word = text.ToCharArray();
for (int i = 0; i < word.Length; i++)
{
    Console.WriteLine(word[i]);
}

but it splits letters from diacritics.
I want it to be like this

مَ
رْ
حَ
بَ
ا
 
كَ
يْ
فَ
 
حَ
ا
لُ
ك
0 Answers
Related