Right-to-Left and Left-to-Right printed nicely

前端 未结 1 969
名媛妹妹
名媛妹妹 2020-12-11 08:12

I want it to produce the number next to a word so that I can ask the user to select the word by using the corresponding number.

This is my code

alt_w         


        
相关标签:
1条回答
  • 2020-12-11 08:56

    Put a Right-to-Left Embedding character, u'\u202B', at the beginning of each Hebrew word, and a Pop Directional Formatting character, u'\u202C', at the end of each word.

    This will set the Hebrew words apart as RTL sections in an otherwise LTR document.

    (Note that while this will produce the correct output, you're also dependent on the terminal application in which you're running this script having implemented the Unicode Bidirectional Algorithm correctly.)

    0 讨论(0)
提交回复
热议问题