Summarized test results:
Bidi algorithm in HTML

Intended audience: users, XHTML/HTML coders (using editors or scripting), script developers (PHP, JSP, etc.), CSS coders, Web project managers, and anyone who wants to know how language declarations work in current browsers.

Updated

These tests check whether user agents apply the basic bidirectional algorithm to text in HTML and XHTML documents (with no markup or styling involved).

Note that the snapshot summaries of these test results are for released versions of the browsers tested. Versions that are still in development may provide better support for these features. The tests themselves do not test any vendor prefixes.

results

To see the test, click on the link in the left-most column. To see detailed results for a single test, click on the link in the right-most column. To submit test data for a single test, click on the link in the right-most column and then follow the link on that page.

The tables show the latest results from the W3C Test Framework. Below the tables are summaries of the results at a given date. The table data may be more up-to-date than the summary. The tables may also contain some incorrectly scored tests, and tests that relate to non-released versions of browsers. These are not included in the summary.

Bidi algorithm (no markup)

Assertion Gecko Presto Trident WebKit Detailed results
directional type, ltr context, hebrew In a left-to-right context, without markup, styling or special characters, a sequence of Hebrew characters and spaces will progress from right to left.
directional type, ltr context, arabic In a left-to-right context, without markup, styling or special characters, a sequence of Arabic characters and spaces will progress from right to left.
directional type, ltr context, hebrew in english In a left-to-right context, without markup, styling or special characters, a sequence of Hebrew characters and spaces will progress from right to left when embedded in a left-to-right script.
directional type, rtl context, english In a right-to-left context, without markup, styling or special characters, a sequence of English characters and spaces will progress from left to right.
directional type, rtl context, english in arabic In a right-to-left context, without markup, styling or special characters, a sequence of English characters and spaces will progress from left to right when embedded in a right-to-left script.
directional type, rtl context, english in hebrew In a right-to-left context, without markup, styling or special characters, a sequence of English characters and spaces will progress from left to right when embedded in a right-to-left script.
numbers, european A number takes on the direction of the surrounding text.
numbers, arabic A number using Arabic digits takes on the direction of the surrounding text.

Snapshot summary, 2011-11-12

All tests worked as expected, ie. the basic bidirectional algorithm is applied correctly to text without markup or styling to bidirectional text for all browsers tested.

Control character overrides

Assertion Gecko Presto Trident WebKit Detailed results
RLO/PDF around inline text Inline text surrounded by RLO and PDF controls will run right to left.
RLO/PDF around inline element Text in an inline element surrounded by RLO and PDF controls will run right to left.
RLO/PDF around inline text around inline element Inline text that includes an inline element and is surrounded by RLO and PDF controls will all run right to left in a single flow.
RLO/PDF around block element Text in a block element surrounded by RLO and PDF controls will not run right to left.
RLO/PDF around inline text around block element When text that surrounds a block element is surrounded in turn by RLO and PDF controls, the text inside the block element will run left to right.
RLO/PDF around inline text around block element 2 When text that surrounds a block element is surrounded in turn by RLO and PDF controls, the text outside the block element will run right to left when it appears before but not after the block element.

Snapshot summary, 2011-11-12

All tests but one worked as expected. RLO...PDF will override the bidirectional algorithm for inline text, regardless of inline markup. The control characters do not, however, affect text in block elements.

What didn't work as expected in Opera was that if you have RLO followed by inline text, then a block element, then inline text again, and finally PDF, the order of the second run of inline text is not overridden. The expected behavior is not clearly stated for Unicode control characters, but the Unicode Bidirectional Algorithm says that RLO is closed by an end of paragraph. Most browsers seem to assume that the start of a block element signifies the start of a new paragraph, and closes the preceding paragraph.