Unicode has four invisible controls for isolating a span of bidirectional text from what surrounds it:
- U+2066 LEFT-TO-RIGHT ISOLATE — LRI;
- U+2067 RIGHT-TO-LEFT ISOLATE — RLI;
- U+2068 FIRST STRONG ISOLATE — FSI;
- U+2069 POP DIRECTIONAL ISOLATE — PDI.
They’re designed for situations where an inserted piece of left-to-right or right-to-left text should have its own bidi context instead of unexpectedly influencing the ordering around it.
The Four Bidi Isolate Controls
| Code point | Name | Short name | Role |
|---|---|---|---|
| U+2066 | LEFT-TO-RIGHT ISOLATE | LRI | Starts an isolated LTR span |
| U+2067 | RIGHT-TO-LEFT ISOLATE | RLI | Starts an isolated RTL span |
| U+2068 | FIRST STRONG ISOLATE | FSI | Starts an isolate whose direction is inferred from its content |
| U+2069 | POP DIRECTIONAL ISOLATE | PDI | Ends the matching isolate scope |
These are part of the wider family of invisible and special space characters. They normally have no glyph of their own.
Why Does Unicode Need Directional Isolation?
Mixed-direction text contains more than obvious LTR and RTL letters. Punctuation, numbers, spaces, and inserted labels all participate in the Unicode Bidirectional Algorithm.
That gets especially tricky when an application inserts text whose direction isn’t known in advance—for example, a name, label, or user-supplied value.
Without isolation, strong directional characters inside that inserted text can participate in the ordering of surrounding text. Isolates create a boundary so the inserted span behaves more like a self-contained object for the surrounding bidi calculation.
What Does LRI Do?
U+2066 LEFT-TO-RIGHT ISOLATE starts an isolated span whose direction is left to right.
[LRI] left-to-right content [PDI]
LRI is useful when the application already knows the inserted content should use an LTR isolate.
What Does RLI Do?
U+2067 RIGHT-TO-LEFT ISOLATE starts the corresponding right-to-left isolate.
[RLI] right-to-left content [PDI]
It doesn’t reverse the characters. It establishes an RTL isolate, and the text inside is still ordered by the Unicode Bidirectional Algorithm.
What Does FSI Do?
U+2068 FIRST STRONG ISOLATE is useful when the direction of the inserted text isn’t known beforehand.
FSI takes the direction of the first strong directional character in its content that is not inside a nested isolate.
[FSI] unknown-direction content [PDI]
This is a good fit for dynamic text whose direction may vary from one value to the next.
What Does PDI Do?
U+2069 POP DIRECTIONAL ISOLATE ends the scope of the matching LRI, RLI, or FSI.
The normal structures are [LRI] ... [PDI], [RLI] ... [PDI], and [FSI] ... [PDI].
Isolates can be nested, and Unicode’s matching rules account for nested isolate initiators.
What Does “Isolate” Actually Mean?
In the later stages of the UBA, an isolate initiator and its matching PDI act like invisible neutral characters for the surrounding text.
That’s the useful mental model: the content inside gets its own bidi processing, while the outside sees the isolate boundary more like a neutral pair than like ordinary strongly directional text leaking into the surrounding run.
This is more precise than saying the isolate “hides” or “reverses” its content. It does neither.
LRI/RLI vs LRM/RLM
| Controls | Type | Typical job |
|---|---|---|
| LRM / RLM | Unpaired directional marks | Add a local strong-direction clue |
| LRI / RLI / FSI + PDI | Scoped directional isolates | Isolate an entire span from surrounding bidi influence |
If you only need the lightweight marks, see LRM vs RLM: What Left-to-Right Mark and Right-to-Left Mark Do.
Is an Isolate the Same as an Embedding?
No.
Unicode also has older explicit embedding and override controls such as LRE, RLE, LRO, RLO, and PDF. Isolates were introduced so strongly directional content can be inserted without unduly affecting the bidi ordering of its surroundings.
The key difference is the boundary behavior: an isolate’s content is kept out of the surrounding directional calculation in ways ordinary embeddings are not.
Does LRI or RLI Reverse Text?
No. They establish directional isolate contexts. Characters inside still keep their own bidi properties and are ordered according to the algorithm.
Why Is FSI Useful for Dynamic Text?
Suppose an app inserts a person’s name into a sentence. One value may begin with Latin text; another may begin with Hebrew or Arabic.
If the app doesn’t know the direction beforehand, forcing LRI or RLI can be wrong for some values. FSI lets the isolate direction be inferred from the first relevant strong character instead.
This is a Unicode-level direction mechanism, not a complete security policy. Applications handling untrusted bidi controls still need appropriate validation and display rules.
Why Can Bidi Isolates Show Up in Copied Text?
They’re real code points. If a source uses them to stabilize mixed-direction text, copying the text can preserve them.
In another editor they may look like unexplained hidden characters, but removing them can change how the text around them is displayed.
Do Bidi Isolates Matter for Search or Comparison?
Unicode says bidi ordering controls should be ignored for layout-unrelated processes such as sorting or searching. However, an exact code-point or binary comparison still sees the extra control characters unless the application applies a comparison policy that ignores them.
So two visually equivalent strings can still be different encoded sequences even when a user-facing search system chooses to treat them as equivalent.
Should You Remove LRI, RLI, FSI, or PDI?
Not blindly.
These controls are normally scoped: LRI, RLI, or FSI is paired with a PDI. Unicode specifically warns text-modifying processes to maintain these controls correctly so paired formatting isn’t disrupted.
Removing only an opener or only a PDI can leave a different bidi structure from the one the author intended.
If you’re cleaning text, inspect the isolate structure as a whole. How to Find and Remove Invisible Unicode Characters Without Breaking Text gives a broader inspection-first workflow.
How Can You Detect Bidi Isolates?
Use a code-point-aware tool and look for:
- U+2066 — LEFT-TO-RIGHT ISOLATE;
- U+2067 — RIGHT-TO-LEFT ISOLATE;
- U+2068 — FIRST STRONG ISOLATE;
- U+2069 — POP DIRECTIONAL ISOLATE.
Appearance alone won’t tell you they’re there.
The Main Point
LRI starts an isolated left-to-right span. RLI starts an isolated right-to-left span. FSI starts an isolate whose direction is inferred from its first relevant strong character. PDI ends the matching isolate.
The purpose isn’t to reverse text. It’s to stop one directional span from unexpectedly influencing the bidi ordering around it.