01.11.2014 Views

A Proposal for Bidi Isolates in Unicode

A Proposal for Bidi Isolates in Unicode

A Proposal for Bidi Isolates in Unicode

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

the surround<strong>in</strong>g text from the effects of miss<strong>in</strong>g and extra PDFs <strong>in</strong>side the isolate.<br />

Thus, <strong>in</strong> “ RLI‧RLO‧PDI<br />

the end” the isolate does not let the effects of the RLO leak out to<br />

make “the end” display as “dne eht”.<br />

We feel that this is an important enough advantage to outweigh the loss of the higher level of<br />

<strong>for</strong>ward compatibility that would have been achieved by mak<strong>in</strong>g isolates “weaker” (and thus<br />

result <strong>in</strong> new applications ignor<strong>in</strong>g isolates <strong>in</strong> improperly nested paragraphs just like old<br />

applications). Thus, the proposal does not let older applications mis<strong>in</strong>terpret nested isolates as<br />

end<strong>in</strong>g embedd<strong>in</strong>gs and overrides - but only when the isolates are properly nested.<br />

That isolates “stronger” than embedd<strong>in</strong>gs and overrides isolate the surround<strong>in</strong>g text from the<br />

effects of miss<strong>in</strong>g and extra PDFs <strong>in</strong>side them matches the behavior of CSS isolates <strong>in</strong> this<br />

respect (see follow<strong>in</strong>g sections), which is another important consideration <strong>in</strong> their favor.<br />

Another approach that has been suggested <strong>for</strong> treat<strong>in</strong>g improperly nested embedd<strong>in</strong>gs/overrides<br />

and isolates is a symmetric one: a PDF encountered when a PDI is expected would close the<br />

match<strong>in</strong>g LRE/RLE/LRO/RLO as well as all isolates started <strong>in</strong> between, and a PDI encountered<br />

when a PDF is expected would close the match<strong>in</strong>g LRI/RLI/FSI as well as all embedd<strong>in</strong>gs and<br />

overrides started <strong>in</strong> between. However, as po<strong>in</strong>ted out by Asmus Freytag, this does not achieve<br />

the isolation of both miss<strong>in</strong>g and extra PDFs that “stronger” isolates provide.<br />

For example, with “stronger” isolates, “ LRE<br />

Dr<strong>in</strong>k RLI‧PDF<br />

PDI א<br />

! PDF<br />

” <strong>in</strong> an RTL context is<br />

displayed as “Dr<strong>in</strong>k ‏”!א (because the extra PDF <strong>in</strong>side the isolate is ignored). On the<br />

other hand, with the symmetric approach, the extra PDF <strong>in</strong>side the isolate would<br />

term<strong>in</strong>ate both the isolate and the LRE, result<strong>in</strong>g <strong>in</strong> the str<strong>in</strong>g display<strong>in</strong>g as א!“‏ Dr<strong>in</strong>k”.<br />

Thus, the symmetric approach is also rejected <strong>in</strong> favor of “stronger” isolates.<br />

As with embedd<strong>in</strong>gs and overrides, all isolates are term<strong>in</strong>ated at the end of a paragraph.<br />

<strong>Isolates</strong> <strong>in</strong> HTML and CSS<br />

The CSS3 work<strong>in</strong>g draft specification (Writ<strong>in</strong>g Modes Level 3) has been expanded to provide<br />

isolation (and first-strong automatic detection <strong>for</strong> isolates) via new values of the unicode-bidi<br />

property: isolate, pla<strong>in</strong>text, and isolate-override. Each def<strong>in</strong>es a different flavor of isolate (see<br />

more below).<br />

The HTML5 specification employs these CSS features by default <strong>in</strong> various situations, e.g.<br />

unicode-bidi:isolate <strong>for</strong> the new element and unicode-bidi:pla<strong>in</strong>text <strong>for</strong> .

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!