Template talk:Bdo

Arabic text and numerals

 * Copied from Village pump (technical), original context [#Arabic_text_and_numerals]. --cesarb 23:14, 27 April 2007 (UTC)

The problem is that the HTML specification and all the browsers use the Unicode Bidirectional Algorithm, which although it may be quite versatile, does need tweaking at times to get things to display correctly. The problem here is that weak characters such as numerals adopt the type of strong characters logically before them, which in this case is the arabic text, not the latin text following. I wouldn't recommend using the override characters (LRO/RLO or HTML's BDO), since their purpose is to make text go backwards, e.g. &#x7B;&#x7B;bdo|rtl|unicode}} ->. Rather I'd suggest separating the numbers and the arabic text with an LRM character. LRM is a non-displaying character with strong left-to-right type, so it makes weak characters after it become left-to-right. Using a pasted LRM character works both in the edit box and on display:


 * سر الختم الخليفة‎1234 456 789 test

Using HTML character entities works on display:


 * سر الختم الخليفة&lrm;1234 456 789 test

--- Tim Starling 09:44, 26 April 2007 (UTC)