The problem I found was that some of the English in the third block was displayed to the left of the Arabic in the second block, i.e. the implicit text ordering algorithm wasn't able to correctly determine where the Arabic right-to-left block had completed and the next English left-to-right block had started.
[1. English left-to-right text] [2. Arabic right-to-left text] [3. English left-to-right text]
To get around this problem I had to explicitly specify directional formatting characters (
\u202Eetc) something as follows:
To get the text to render as you intend I found you might need to play around a little with the directional formatting characters. For example, you might have to surround the English block with directional formatting characters rather than or as well as the Arabic text.
[1. English left-to-right text] \u202B [2. Arabic right-to-left text] \u202C [3. English left-to-right text]
Here's the Stack Overflow thread which led me to the solution:
For a deeper understanding of directional formatting characters and the Unicode Bidirectional Algorithm, check out the following document: