<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>Le 10 avr. 09 à 13:29, وفا خلیقی a écrit :</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr"><br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div class="h5"><br> </div></div>I, personally, don't think we need to code any thing at the engine<br> level, this just make things more complex and less flexible, lets take<br> the example Taco pointed out, if we applied bidi algorithm on 3.5<br> (chapter 3, section 5) it'll stay 3.5 regardless of text direction,<br> however it should be 5.3 in RTL, and some people might disagree and say<br> it should be 3.5 in all cases. If BiDi was hard coded in th engine, it'll<br> just make things more complex, and one will need to put a Unicode 'right<br> to left mark' before the dot. The same can be said for numbered lists<br> etc.<br> <div><div></div><div class="h5"><br></div></div></blockquote><div><br><br>You picked up the very wrong example. That is all I can say.&nbsp; No, absolutely the same can not be said about numbers and etc.<br></div></div></div></blockquote></div><br><div>Bidi algorithm is certainly not perfect but it handles most cases correctly and it gives you the possibility to force a given directional behaviour, if needed.</div><div><br></div><div>The BIG advantage of the bidi algorithm is that it is a standard. Every piece of software will represent the same Unicode string in the same way. For example, if you keyboard your text using a bidi-compatible text editor, then you will get the same output as what you'll see on your screen. And once you get used to the behaviour of text with respect to the five bidi special characters, then you can keyboard RTL languages in the same way everywhere. That's an improvement to previous input methods.</div><div><br></div><div>I'm convinced that it is a good thing to implement bidi, *but* it may not be trivial since bidi needs information coming from higher-level protocols about the main direction in the context of the document. For example, in the case of XHTML you have a dir attribute. Here is the correponding text:</div><div><br></div><div><span class="Apple-style-span" style="font-family: Arial; font-size: 16px; "><table border="0" cellspacing="0" cellpadding="4" class="noborder" style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: collapse; border-top-color: black; border-right-color: black; border-bottom-color: black; border-left-color: black; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><tbody><tr><td valign="top" class="noborder" style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: collapse; border-top-color: black; border-right-color: black; border-bottom-color: black; border-left-color: black; font-family: 'Lucida Sans Unicode', 'Arial Unicode MS', Arial, sans-serif; color: black; vertical-align: top; text-align: left; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><div style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><i><a name="HL1">HL1</a>.</i></div></td><td valign="top" class="noborder" style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: collapse; border-top-color: black; border-right-color: black; border-bottom-color: black; border-left-color: black; font-family: 'Lucida Sans Unicode', 'Arial Unicode MS', Arial, sans-serif; color: black; vertical-align: top; text-align: left; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><p><i>Override P3, and set the paragraph embedding level explicitly.</i></p><ul><li style="margin-top: 0.25em; margin-bottom: 0.25em; ">A higher-level protocol may set the paragraph level explicitly and ignore P3. This can be done on the basis of the context, such as on a table cell, paragraph, document, or system level.</li></ul></td></tr><tr><td valign="top" class="noborder" style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: collapse; border-top-color: black; border-right-color: black; border-bottom-color: black; border-left-color: black; font-family: 'Lucida Sans Unicode', 'Arial Unicode MS', Arial, sans-serif; color: black; vertical-align: top; text-align: left; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><i><a name="HL2">HL2</a>.</i></td><td valign="top" class="noborder" style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: collapse; border-top-color: black; border-right-color: black; border-bottom-color: black; border-left-color: black; font-family: 'Lucida Sans Unicode', 'Arial Unicode MS', Arial, sans-serif; color: black; vertical-align: top; text-align: left; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><i>Override W2, and set EN or AN explicitly.</i><ul><li style="margin-top: 0.25em; margin-bottom: 0.25em; ">A higher-level process may reset characters of type EN to AN, or vice versa, and ignore W2. For example, style sheet or markup information can be used within a span of text to override the setting of EN text to be always be AN, or vice versa.</li></ul></td></tr><tr><td valign="top" class="noborder" style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: collapse; border-top-color: black; border-right-color: black; border-bottom-color: black; border-left-color: black; font-family: 'Lucida Sans Unicode', 'Arial Unicode MS', Arial, sans-serif; color: black; vertical-align: top; text-align: left; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><i><a name="HL3">HL3</a>.</i></td><td valign="top" class="noborder" style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: collapse; border-top-color: black; border-right-color: black; border-bottom-color: black; border-left-color: black; font-family: 'Lucida Sans Unicode', 'Arial Unicode MS', Arial, sans-serif; color: black; vertical-align: top; text-align: left; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><i>Emulate directional overrides or embedding codes.</i><ul><li style="margin-top: 0.25em; margin-bottom: 0.25em; ">A higher-level protocol can impose a directional override or embedding on a segment of structured text. The behavior must always be defined by reference to what would happen if the equivalent explicit codes as defined in the algorithm were inserted into the text. For example, a style sheet or markup can set the embedding level on a span of text.</li></ul></td></tr><tr><td valign="top" class="noborder" style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: collapse; border-top-color: black; border-right-color: black; border-bottom-color: black; border-left-color: black; font-family: 'Lucida Sans Unicode', 'Arial Unicode MS', Arial, sans-serif; color: black; vertical-align: top; text-align: left; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><i><a name="HL4">HL4</a>.</i></td><td valign="top" class="noborder" style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: collapse; border-top-color: black; border-right-color: black; border-bottom-color: black; border-left-color: black; font-family: 'Lucida Sans Unicode', 'Arial Unicode MS', Arial, sans-serif; color: black; vertical-align: top; text-align: left; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><i>Apply the Bidirectional Algorithm to segments</i>.<ul><li style="margin-top: 0.25em; margin-bottom: 0.25em; ">The Bidirectional Algorithm can be applied independently to one or more segments of structured text. For example, when displaying a document consisting of textual data and visible markup in an editor, a higher-level process can handle syntactic elements in the markup separately from the textual data.</li></ul></td></tr><tr><td valign="top" class="noborder" style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: collapse; border-top-color: black; border-right-color: black; border-bottom-color: black; border-left-color: black; font-family: 'Lucida Sans Unicode', 'Arial Unicode MS', Arial, sans-serif; color: black; vertical-align: top; text-align: left; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><i><a name="HL5">HL5</a>.</i></td><td valign="top" class="noborder" style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: collapse; border-top-color: black; border-right-color: black; border-bottom-color: black; border-left-color: black; font-family: 'Lucida Sans Unicode', 'Arial Unicode MS', Arial, sans-serif; color: black; vertical-align: top; text-align: left; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><i>Provide artificial context.</i><ul><li style="margin-top: 0.25em; margin-bottom: 0.25em; ">Text can be processed by the Bidirectional Algorithm as if it were preceded by a character of a given type and/or followed by a character of a given type. This allows a piece of text that is extracted from a longer sequence of text to behave as it did in the larger context.</li></ul></td></tr><tr><td valign="top" class="noborder" style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: collapse; border-top-color: black; border-right-color: black; border-bottom-color: black; border-left-color: black; font-family: 'Lucida Sans Unicode', 'Arial Unicode MS', Arial, sans-serif; color: black; vertical-align: top; text-align: left; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><i><a name="HL6">HL6</a>.</i></td><td valign="top" class="noborder" style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: collapse; border-top-color: black; border-right-color: black; border-bottom-color: black; border-left-color: black; font-family: 'Lucida Sans Unicode', 'Arial Unicode MS', Arial, sans-serif; color: black; vertical-align: top; text-align: left; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><i>Additional mirroring</i>.<ul><li style="margin-top: 0.25em; margin-bottom: 0.25em; ">Characters with a resolved directionality of R that do not have the Bidi_Mirrored property can also be depicted by a mirrored glyph in specialized contexts. Such contexts include, but are not limited to, historic scripts and associated punctuation, private-use characters, and characters in mathematical expressions. (See&nbsp;<span class="section" style="font-style: italic; ">Section&nbsp;</span><span class="secno" style="font-style: italic; ">6,</span><i><a href="http://www.unicode.org/reports/tr9/#Mirroring" style="color: red; ">Mirroring</a></i>.)</li></ul></td></tr></tbody></table></span></div></body></html>