Search This Blog

Thursday, December 22, 2016

Concatenating strings with different writing systems / orientations (RTL, LTR) and forcing the resulting one's orientation to one of them

If you are facing problems in concatenating strings with different writing systems/orientations into a single one (those that are RTL are all moved to the beginning of the string, for instance) - you can find a solution to the problem here.

Basically, you need to prepend to the strings you want to manually change the orientation the unicode character that specifies the orientation of the following piece of text. If you have RTL and LTR strings and do not want the LTR strings to be positioned at the beginning, rather in their proper positions, prepend the unicode character \u200E.

No comments:

Post a Comment