Parsing through Arabic / RTL text from left to right
Posted
by
Dan W
on Stack Overflow
See other posts from Stack Overflow
or by Dan W
Published on 2012-09-27T21:51:47Z
Indexed on
2012/09/28
3:38 UTC
Read the original article
Hit count: 154
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.
© Stack Overflow or respective owner