on-internet
← Community

Print Arabic or any Right-to-Left writing-system string to Linux terminal using Python

Stack Overflow ·

The very simple example is: city = "‏المكلا‎" print(city) I am expecting the output to be: ‏المكلا‎ But in fact the ouput is the reverse string (the letters look a little different because they have a start-, middle- and end-form). I can't paste it here, because copy-pasting corrects the order of the string again. How can I print Arabic correctly to the Linux terminal? The surounding text is left-to-right (LTR) and only this line needs to be right-to-left (RTL). Is there a UFT-8 character that can tell ther terminal that?

Comments

Sign in or sign up to comment and upvote.

No comments yet.