Right to left isolate string

I am facing a tough problem with Farsi unicodes.

I have an std::wstring s = (L"\u0634\u0646\u0628\u0647"); which is a Farsi word. When I debug it, I see that the underlying word is exactly what I want, but reversed. So I have researched and found that u2067 is for right to left reading the string.

NOTE:

I cannot reverse the string manually because Farsi characters are changing their shape regardless of their position in the string.

So I added the 2067 int the beginning and got

std::wstring s = (L"\u2067\u0634\u0646\u0628\u0647");.

But now the underlying string is the same, just added a square in the beginning if the string instead of reversing.

Does anyone have experince with this stuff? Please suggest a solution. Thanks!
I'm not sure, but try:

 
std::wstring s = L"\u202B\u0634\u0646\u0628\u0647\u202C";

Note that there's a start and end character.
Last edited on
Topic archived. No new replies allowed.