1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
4 Based on http://dbaron.org/css/test/bidi2_charcode by Dave Baron, dbaron@dbaron.org
5 Copied with permission on 2005-09-10
6 Modified with permission (rearranged to fit in 800x600 and changed to make more
7 testcases have the same expected layout).
9 <TITLE>Bidirectional Text Test
2 - Formatting Characters
</TITLE>
10 <meta http-equiv=
"Content-Type" content=
"text/html; charset=iso-8859-1">
11 <meta http-equiv=
"Content-Style-Type" content=
"text/css">
12 <LINK REL=
"copyright" HREF=
"/~dbaron/legal.html">
13 <STYLE TYPE=
"text/css">
14 body { overflow: hidden; }
15 p { text-align: left; }
17 table.pair { border-spacing:
0; margin-bottom:
0; }
18 table.pair td { padding:
0; }
21 .rtl { direction: rtl; }
22 .ltr { direction: ltr; }
24 div.box { border:
1px green solid; display:inline-block; padding:
3px; margin:
3px; vertical-align:middle; }
29 <H1>Bidirectional Text Test
2 - Formatting Characters
</H1>
41 <p>This test is based on
<a
42 href=
"http://www.w3.org/TR/REC-CSS2/visuren.html#direction">CSS2 section
43 9.10</a> and
<a href=
"http://www.unicode.org/unicode/uni2book/ch03.pdf">Chapter
44 3</a> of the
<a href=
"http://www.unicode.org/unicode/uni2book/u2.html">Unicode
48 Note that
<a href=
"http://www.w3.org/TR/unicode-xml/#Bidi">Unicode in
49 XML and other Markup Languages
</a> suggests that HTML UAs should ignore
52 <p>In each box, all the lines should be the same.
</p>
54 <p class=
"pair">ABCDEFGHI
</p>
55 <p class=
"rtl pair">‫ABCDEFGHI
‬</p>
56 <p class=
"rtl pair">‫ABC
<span>DEF
</span>GHI
‬</p>
57 <p class=
"rtl pair">‮IHGFEDCBA
‬</p>
58 <p class=
"rtl pair">‮IHG
<span>FED
</span>CBA
‬</p>
59 <p class=
"rtl pair">‮IHG
‫DEF
‬CBA
‬</p>
60 <p class=
"rtl pair">‮IHG
‮FED
‬CBA
‬</p>
61 <p class=
"rtl pair">‮IHG
‮FED
‬CBA
‬</p>
62 <p class=
"rtl pair">‮IHG
‭DEF
‬CBA
‬</p>
66 <table class=
"pair"><tr><td>ג</td><td>ב</td><td>א</td></tr></table>
67 <p class=
"pair">אבג</p>
68 <p class=
"pair">‪אבג‬</p>
69 <p class=
"pair">‭גבא‬</p>
74 <table class=
"pair"><tr><td>ג</td><td>ב</td><td>א</td><td> </td><td>A
</td><td>B
</td><td>C
</td><td> </td><td>ו</td><td>ה</td><td>ד</td></tr></table>
75 <p class=
"pair">אבג ABC
דהו</p>
76 <p class=
"pair rtl">דהו ABC
אבג</p>
80 <table class=
"pair"><tr><td>ג</td><td>ב</td><td>א</td><td> </td><td>A
</td><td>B
</td><td>C
</td><td> </td><td>ו</td><td>ה</td><td>ד</td><td> </td><td>D
</td><td>E
</td><td>F
</td><td> </td><td>ט</td><td>ח</td><td>ז</td></tr></table>
81 <p class=
"pair">אבג ABC
דהו DEF
זחט</p>
82 <p class=
"pair">אבג <span>ABC
דהו</span> DEF
זחט</p>
83 <p class=
"pair">אבג ‪ABC
דהו DEF
‬ זחט</p>
84 <p class=
"pair">זחט ‫DEF
דהו ABC
‬ אבג</p>
85 <p class=
"pair">דהו ‫ABC
אבג‬ DEF
זחט</p>
86 <p class=
"pair">דהו ‮CBA
אבג‬ DEF
זחט</p>
87 <p class=
"pair">אבג ‭ABC
והד‬ DEF
זחט</p>
88 <p class=
"pair rtl">זחט ‭ABC
והד‬ DEF
אבג</p>
92 <table class=
"pair"><tr><td>ג</td><td>ב</td><td>א</td><td> </td><td>A
</td><td>B
</td><td>C
</td><td> </td><td>ו</td><td>ה</td><td>ד</td><td> </td><td>D
</td><td>E
</td><td>F
</td><td> </td><td>G
</td><td>H
</td><td>I
</td><td> </td><td>ט</td><td>ח</td><td>ז</td></tr></table>
93 <p class=
"pair">אבג ABC
דהו DEF GHI
זחט</p>
97 <table class=
"pair"><tr><td>F
</td><td>E
</td><td>D
</td><td> </td><td>ו</td><td>ה</td><td>ד</td><td> </td><td>C
</td><td>B
</td><td>A
</td><td> </td><td>ג</td><td>ב</td><td>א</td><td> </td><td>G
</td><td>H
</td><td>I
</td><td> </td><td>ט</td><td>ח</td><td>ז</td></tr></table>
98 <p class=
"pair">אבג ‮ABC
דהו DEF
‬ GHI
זחט</p>
102 <table class=
"pair"><tr><td>ג</td><td>ב</td><td>א</td><td> </td><td>A
</td><td>B
</td><td>C
</td><td> </td><td>F
</td><td>E
</td><td>D
</td><td> </td><td>ו</td><td>ה</td><td>ד</td><td> 
</td><td>G
</td><td>H
</td><td>I
</td><td> </td><td>ט</td><td>ח</td><td>ז</td></tr></table>
103 <p class=
"pair">אבג ABC
‮דהו DEF
‬ GHI
זחט</p>
105 <p>Note: This test does not test RLM or LRM, but it ought to.
</p>
107 <hr title=
"Beginning of Footer">
109 <P><A HREF="http://validator.w3.org/check/referer" TITLE="W3C HTML Validator"><img src="../../images/vh40" ALT="Valid HTML 4.0!" height="31" width="88"></A></P>
112 <A HREF=
"./">CSS Testing Information
</A>,
113 <A HREF=
"../../">David Baron
</A>)
114 <P><A HREF=
"/" TITLE=
"David Baron's Homepage">LDB
</A>,
115 <A rev=
"made" href=
"mailto:dbaron@dbaron.org" TITLE=
"Send e-mail to David Baron">dbaron@dbaron.org
</A>,
2001-
06-
05</P>
116 <P>Modified and used with the author
’s permission.
</P>