Bidirectional isolate 2026-11-05
A bidirectional isolate is a span treated as a directional unit by the Unicode Bidirectional Algorithm. Its internal text is resolved separately from the surrounding text; the isolate as a whole behaves neutrally in its surroundings. This limits directional interaction when inserting a span whose contents have their own writing direction.[ref]
Unicode Bidirectional Algorithm (Revision 51) by the Unicode Consortium. sections2 and2.4: isolated content and external behavior of the isolate
Unicode directional controls can delimit the span: LRI (
U+2066) chooses left-to-right isolation, RLI (U+2067) chooses right-to-left isolation, FSI (U+2068) infers direction from the first relevant strong character, and PDI (U+2069) terminates the isolate. Higher-level markup can express equivalent isolation without storing those explicit control characters.[ref]Unicode Bidirectional Algorithm (Revision 51) by the Unicode Consortium. sections2.4–2.5 and2.7: isolate controls, termination and markup
An original record-layout example has three fields: a fixed prefix, a user-supplied name and a fixed suffix containing punctuation and an identifier. Treat the inserted name as one isolated span. The outer layout then works with that span as a unit, while its contents receive their own directional processing. A name containing both letters and digits still needs internal reordering; isolation does not prescribe a reversal of every character inside it.
For a reproducible plain-text notation, write the sequence as
prefix RLI payload PDI suffix, with the uppercase labels standing for control code points rather than literal letters in the displayed text. This notation documents the boundary without hiding directional controls in the source example. An actual test should record the concrete payload, paragraph direction, Unicode version and line boundaries as well.Nesting introduces another distinction: a first-strong isolate determines its direction from an eligible strong character outside nested isolates. A direction already enclosed in a nested span need not choose the enclosing span's direction. Naming the span boundary and the rule used to choose its direction makes this behavior explicit.[ref]
Unicode Bidirectional Algorithm (Revision 51) by the Unicode Consortium. section2.4, FSI description; definitionsBD8–BD9: isolate initiators and matching terminators
Unicode directional control 2026-11-05
A Unicode directional control is a formatting code point that affects bidirectional processing without contributing an ordinary visible letter. Directional marks, embeddings, overrides and isolate delimiters provide different mechanisms within the Unicode Bidirectional Algorithm. They affect interpretation of the stored sequence rather than supplying new letter shapes.[ref]
Unicode Bidirectional Algorithm (Revision 51) by the Unicode Consortium. section2: directional formatting groups and their behavior
Left-to-right and right-to-left marks, LRM (
U+200E) and RLM (U+200F), behave as strong directional items while remaining invisible. A right-to-left isolate initiator, RLI (U+2067), instead starts a bounded bidirectional isolate; PDI (U+2069) terminates it. A mark and a span delimiter therefore carry different structural information.[ref]Unicode Bidirectional Algorithm (Revision 51) by the Unicode Consortium. sections2.4–2.6: isolates, termination and directional marks
An original counting example documents controls by their numerical values. The sequence
U+2066 U+0061 U+0062 U+2069 contains LRI, the two Latin letters a and b, and PDI. It contains four code points and eight UTF-8 bytes: three for each delimiter and one for each Latin letter. Its ordinary visible letters are just a and b. Counting visible letters would therefore lose information about the represented sequence.This notation intentionally shows the control values instead of placing hidden directional formatting characters in the source example. To reproduce an actual layout test, record its logical text order, paragraph direction, Unicode version and line boundaries, then compare the computed bidirectional embedding levels and visual text order.
A higher-level format can express equivalent directional structure through markup. The control-code-point representation and the markup representation need not have the same stored characters even when they request corresponding layout behavior. The specification defines those correspondences, while text shaping remains a further part of rendering.[ref]
Unicode Bidirectional Algorithm (Revision 51) by the Unicode Consortium. section2.7: markup equivalents; section3.5: shaping