Why words are shuffled when I insert English words in any Arabic/Urdu/Persian text on Notepad or MS Word?

前端 未结 8 1667
傲寒
傲寒 2020-12-13 18:55

I can write Arabic/Urdu/Persian on MS Word or Notepad just fine, but whenever I insert any English word or number, the sequence is just disturbed and seems like the all the

8条回答
  •  余生分开走
    2020-12-13 19:26

    In word processing, you have a main text direction which is either left-to-right or right-to-left (or top to bottom, but let's ignore that :-), and you have a text direction for individual characters, which will also be left to right or right to left.

    The word processor splits the text into chunks of strings with the same character ordering, then displays these chunks according to the main text ordering.

    It seems that your main text ordering was left to right. As long as all your text is arabic, there is just one chunk with arabic text. You see already it is displayed left aligned and not right aligned because the text ordering is left to right. The characters are displayed right to left because that is how arabic is displayed.

    When you inserted latin text, you had three chunks: Arabic, latin, arabic. These three chunks are displayed left to right because that is the main text ordering. That would be fine for text that is mostly latin (like "The arabic words for dog and cow are ... and ..."). For text that is mostly arabic with the occasional latin word, you need to change the main text ordering to "right to left".

提交回复
热议问题