Examples of bidirectional IRIs
Please view with a browser that does bidirectional rendering correctly!
Please view with a browser that correctly uses nominal digit shapes!
Legends
LTR: left-to-right; RTL: right-to-left; legends are also available as title popups.
- Logical Hebrew (displayed using LTR override)
- Visual Hebrew in LTR context
- Visual Hebrew in calculated LTR context (displayed using LTR override;
should match green b)
- ASCII notation (upper case is Hebrew)
- ASCII notation (logical)
- ASCII notation (upper case is Arabic)
- Visual Arabic in LTR context
- Visual Arabic in calculated LTR context (displayed using LTR override;
should match green g)
- Logical Arabic (displayed using LTR override)
- Visual Arabic in RTL context
- Visual Hebrew in RTL context
Example 1
A single component with rtl characters is inverted. Components can be read one by one, and each component can be read in its natural direction.
- http://ab.גדהוזח.ij/kl/mn/op.html
- http://ab.גדהוזח.ij/kl/mn/op.html
- http://ab.חזוהדג.ij/kl/mn/op.html
- http://ab.HGFEDC.ij/kl/mn/op.html
- http://ab.CDEFGH.ij/kl/mn/op.html
- http://ab.HGFEDC.ij/kl/mn/op.html
- http://ab.تثجحخد.ij/kl/mn/op.html
- http://ab.دخحجثت.ij/kl/mn/op.html
- http://ab.تثجحخد.ij/kl/mn/op.html
- http://ab.تثجحخد.ij/kl/mn/op.html
- http://ab.גדהוזח.ij/kl/mn/op.html
Example 2
More than one consecutive component with rtl characters is inverted as a whole. A sequence of rtl components is read rtl, in the same way as a sequence of rtl words is read rtl in a bidi text.
- http://ab.גדה.וזח/ij/kl/mn/op.html
- http://ab.גדה.וזח/ij/kl/mn/op.html
- http://ab.חזו.הדג/ij/kl/mn/op.html
- http://ab.HGF.EDC/ij/kl/mn/op.html
- http://ab.CDE.FGH/ij/kl/mn/op.html
- http://ab.HGF.EDC/ij/kl/mn/op.html
- http://ab.تثج.حخد/ij/kl/mn/op.html
- http://ab.دخح.جثت/ij/kl/mn/op.html
- http://ab.تثج.حخد/ij/kl/mn/op.html
- http://ab.تثج.حخد/ij/kl/mn/op.html
- http://ab.גדה.וזח/ij/kl/mn/op.html
Example 3
All components of an IRI (except for the scheme) are rtl. All rtl components are inverted overall. The whole IRI (except the scheme) is read rtl. Delimiters between rtl components stay between the respective components; delimiters between ltr and rtl components don't move.
- http://אב.גד.הו/זח/טי/כל?מן=סע;פץ=קר#שת
- http://אב.גד.הו/זח/טי/כל?מן=סע;פץ=קר#שת
- http://תש#רק=ץפ;עס=ןמ?לכ/יט/חז/וה.דג.בא
- http://VU#TS=RQ;PO=NM?LK/JI/HG/FE.DC.BA
- http://AB.CD.EF/GH/IJ/KL?MN=OP;QR=ST#UV
- http://VU#TS=RQ;PO=NM?LK/JI/HG/FE.DC.BA
- http://اب.تث.جح/خد/ذر/زس?شص=ضط;ظع=غف#قك
- http://كق#فغ=عظ;طض=صش?سز/رذ/دخ/حج.ثت.با
- http://اب.تث.جح/خد/ذر/زس?شص=ضط;ظع=غف#قك
- http://اب.تث.جح/خد/ذر/زس?شص=ضط;ظع=غف#قك
- http://אב.גד.הו/זח/טי/כל?מן=סע;פץ=קר#שת
Example 4
Each of several sequences of rtl components is inverted on its own. Each sequence of rtl components is read rtl, in the same way as each sequence of rtl words in an ltr text is read rtl.
- http://אב.גד.ef/gh/טי/כל.html
- http://אב.גד.ef/gh/טי/כל.html
- http://דג.בא.ef/gh/לכ/יט.html
- http://DC.BA.ef/gh/LK/JI.html
- http://AB.CD.ef/gh/IJ/KL.html
- http://DC.BA.ef/gh/LK/JI.html
- http://اب.تث.ef/gh/ذر/زس.html
- http://ثت.با.ef/gh/سز/رذ.html
- http://اب.تث.ef/gh/ذر/زس.html
- http://اب.تث.ef/gh/ذر/زس.html
- http://אב.גד.ef/gh/טי/כל.html
Example 5
Example 2, applied to components of different kinds. The inversion of the domain name label and the path component may be unexpected, but it is consistent with other bidi behavior. For reassurance that the domain component really is "ab.cd.EF", it may be helpful to read aloud the visual representation following the bidi algorithm. After "http://ab.cd." one reads the RTL block "E-F-slash-G-H", which corresponds to the logical representation.
- http://ab.cd.הו/זח/ij/kl.html
- http://ab.cd.הו/זח/ij/kl.html
- http://ab.cd.חז/וה/ij/kl.html
- http://ab.cd.HG/FE/ij/kl.html
- http://ab.cd.EF/GH/ij/kl.html
- http://ab.cd.HG/FE/ij/kl.html
- http://ab.cd.جح/خد/ij/kl.html
- http://ab.cd.دخ/حج/ij/kl.html
- http://ab.cd.جح/خد/ij/kl.html
- http://ab.cd.جح/خد/ij/kl.html
- http://ab.cd.הו/זח/ij/kl.html
Example 6
Same as Example 5, with more rtl components.The inversion of the domain name labels and the path components may be easier to identify because the delimiters also move.
- http://ab.גד.הו/זח/טי/kl.html
- http://ab.גד.הו/זח/טי/kl.html
- http://ab.יט/חז/וה.דג/kl.html
- http://ab.JI/HG/FE.DC/kl.html
- http://ab.CD.EF/GH/IJ/kl.html
- http://ab.JI/HG/FE.DC/kl.html
- http://ab.تث.جح/خد/ذر/kl.html
- http://ab.رذ/دخ/حج.ثت/kl.html
- http://ab.تث.جح/خد/ذر/kl.html
- http://ab.تث.جح/خد/ذر/kl.html
- http://ab.גד.הו/זח/טי/kl.html
Example 7
A single rtl component includes digits. Numbers are written ltr in all cases but are treated as an additional embedding inside a run of rtl characters. This is completely consistent with usual bidirectional text.
- http://ab.גדה123וזח.ij/kl/mn/op.html
- http://ab.גדה123וזח.ij/kl/mn/op.html
- http://ab.חזו123הדג.ij/kl/mn/op.html
- http://ab.HGF123EDC.ij/kl/mn/op.html
- http://ab.CDE123FGH.ij/kl/mn/op.html
- http://ab.HGF123EDC.ij/kl/mn/op.html
- http://ab.تثج123حخد.ij/kl/mn/op.html
- http://ab.دخح123جثت.ij/kl/mn/op.html
- http://ab.تثج123حخد.ij/kl/mn/op.html
- http://ab.تثج123حخد.ij/kl/mn/op.html
- http://ab.גדה123וזח.ij/kl/mn/op.html
Example 8
Not allowed!Numbers are at the start or end of an rtl component.The sequence "1/2" is interpreted by the bidi algorithm as a fraction, fragmenting the components and leading to confusion. There are other characters that are interpreted in a special way close to numbers; in particular, "+", "-", "#", "$", "%", ",", ".", and ":".
- http://ab.cd.ef/זח1/2טי/כל.html
- http://ab.cd.ef/זח1/2טי/כל.html
- http://ab.cd.ef/לכ/יט1/2חז.html
- http://ab.cd.ef/LK/JI1/2HG.html
- http://ab.cd.ef/GH1/2IJ/KL.html
- http://ab.cd.ef/LK/JI1/2HG.html
- http://ab.cd.ef/خد1/2ذر/زس.html
- http://ab.cd.ef/سز/رذ1/2دخ.html
- http://ab.cd.ef/خد1/2ذر/زس.html
- http://ab.cd.ef/خد1/2ذر/زس.html
- http://ab.cd.ef/זח1/2טי/כל.html
Example 9
Not allowed!The numbers in the previous example are percent-encoded.
- http://ab.cd.ef/זח%31/%32טי/כל.html
- http://ab.cd.ef/זח%31/%32טי/כל.html
- http://ab.cd.ef/לכ/יט%32/%31חז.html
- http://ab.cd.ef/LK/JI%32/%31HG.html
- http://ab.cd.ef/GH%31/%32IJ/KL.html
- http://ab.cd.ef/LK/JI32%/31%HG.html
- http://ab.cd.ef/خد%31/%32ذر/زس.html
- http://ab.cd.ef/سز/رذ32%/31%دخ.html
- http://ab.cd.ef/خد%31/%32ذر/زس.html
- http://ab.cd.ef/خد%31/%32ذر/زس.html
- http://ab.cd.ef/זח%31/%32טי/כל.html
Example 10
Allowed but not recommended! Components consisting of only numbers are allowed (it would be rather difficult to prohibit them), but these may interact with adjacent RTL components in ways that are not easy to predict.
- http://ab.גדהוזח.123/kl/mn/op.html
- http://ab.גדהוזח.123/kl/mn/op.html
- http://ab.123.חזוהדג/kl/mn/op.html
- http://ab.123.HGFEDC/kl/mn/op.html
- http://ab.CDEFGH.123/kl/mn/op.html
- http://ab.123.HGFEDC/kl/mn/op.html
- http://ab.تثجحخد.123/kl/mn/op.html
- http://ab.123.دخحجثت/kl/mn/op.html
- http://ab.تثجحخد.123/kl/mn/op.html
- http://ab.تثجحخد.123/kl/mn/op.html
- http://ab.גדהוזח.123/kl/mn/op.html
Example 11
Allowed but not recommended! Components consisting of numbers and left-to-right characters are allowed, but these may interact with adjacent RTL components in ways that are not easy to predict.
- http://ab.גדהוזח.123ij/kl/mn/op.html
- http://ab.גדהוזח.123ij/kl/mn/op.html
- http://ab.123.חזוהדגij/kl/mn/op.html
- http://ab.123.HGFEDCij/kl/mn/op.html
- http://ab.CDEFGH.123ij/kl/mn/op.html
- http://ab.123.HGFEDCij/kl/mn/op.html
- http://ab.تثجحخد.123ij/kl/mn/op.html
- http://ab.123.دخحجثتij/kl/mn/op.html
- http://ab.تثجحخد.123ij/kl/mn/op.html
- http://ab.تثجحخد.123ij/kl/mn/op.html
- http://ab.גדהוזח.123ij/kl/mn/op.html