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

Arfeen picture Arfeen · Mar 8, 2012 · Viewed 69.9k times · Source

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 words have been shuffled in the sentence.

Look at the example below:

یہ ایک مثال ہے اردو کی ...

Now I inserted an English word and it became:

 یہ ایک مثال ہےword  اردو کی ...

So you can see almost all of the words have been jumbled ... what is the solution for that ?

Answer

Elliot Bannister picture Elliot Bannister · Dec 5, 2012

For example:

باللغة العربية “keyboard” انا أريد أن أعرف الكلمة

  1. Finish typing the Arabic word and add a space after it (this space separates the embedded text from the Arabic text to its right).
  2. Insert special character U+200F (to render the preceding space an Arabic character). The character name is "Right to Left Mark".
  3. Insert special character U+202A (to begin the left-to-right embedding). The character name is "Left to Right Embedding".
  4. Insert another space (to separate the embedded text from the Arabic text that will continue to its left).
  5. Change the keyboard to e.g. English and type the left-to-right word.
  6. Insert special character U+202C (to restore the bidrectional state to what it was before the left-to-right embedding). The Character name is "Pop directional formatting".
  7. Change the keyboard back and continue writing in Arabic.

If you're working in Microsoft Office or Open Office, the "special characters" can be found under "insert" [Insert -> symbols -> other symbols -> special characters in MS 2013]. Scroll through until you find the character with the appropriate Unicode number, and if the Unicode number does not appear in your version of MS Word, select it by its name [as indicated above].

You can also add the character by writing it's unicode and then selecting it and pressing Alt+X - but that can be confusing because it needs constant change between Arabic and English.

All of the special characters involved in this little manoeuvre are invisible characters (their job is simply to change the direction of the text) so don't be surprised if it looks like you're not inserting anything.

Pay attention to select the RTL option from the ribbon when the majority of your paragraph is RTL and keep it selected [as shown in the picture in this answer https://stackoverflow.com/a/46050171/8558867 ].