Parsing through Arabic / RTL text from left to right
- by Dan W
Let's say I have a string in an RTL language such as Arabic with some English chucked in:
string s = "Test:?????;?????;?????;a;b"
Notice there are semicolons in the string. When I use the Split command like string[] spl = s.Split(';');, then some of the strings are saved in reverse order. This is what happens:
??Test:?????
?????
?????
a
b
The above is out of order compared to the original. Instead, I expect to get this:
?Test:
?????
?????
?????
a
b
I'm prepared to write my own split function. However, the chars in the string also parse in reverse order, so I'm back to square one. I just want to go through each character as it's shown on the screen.