Unicode Bidi Controls — LRM, RLM, ALM, isolates and embeddings
A reference sheet in which each of the ten shipped bidi control characters appears literally between ASCII guards, with its code point, UTF-8 bytes and the job it does. The two override characters are named but deliberately absent: a bidi rendering fixture does not need to ship the Trojan Source vector.
Unicode bidirectional control characters — reference fixture
============================================================
Every control listed below appears LITERALLY in this file, between the << >> guards, so a parser,
renderer or normalisation routine can be tested against real bytes rather than escapes. Guards are
ASCII and are not part of the character.
Two characters are deliberately ABSENT and are named only: U+202D LEFT-TO-RIGHT OVERRIDE and
U+202E RIGHT-TO-LEFT OVERRIDE. Unbalanced overrides are the "Trojan Source" vector, in which
source code renders in an order that does not match how a compiler reads it. A bidi rendering
fixture does not need to ship one.
IMPLICIT MARKS — zero width, strong direction, no scope
-------------------------------------------------------
U+200E LEFT-TO-RIGHT MARK (LRM) <<>>
UTF-8 E2 80 8E. Acts as an invisible strong LTR character. Use it to pin neutral
characters (punctuation, digits, spaces) to the LTR run beside them.
U+200F RIGHT-TO-LEFT MARK (RLM) <<>>
UTF-8 E2 80 8F. The RTL twin of LRM. CLDR embeds RLM inside several Arabic and Hebrew
date and currency patterns, which is why an "identical looking" pattern string can fail
a byte comparison.
U+061C ARABIC LETTER MARK (ALM) <<>>
UTF-8 D8 9C. Like RLM but classed as Arabic Letter, so it also drives the resolution of
adjacent European and Arabic-Indic digits. Preferred over RLM around numbers in Arabic.
ISOLATES — the modern, nestable, self-terminating mechanism (Unicode 6.3+)
--------------------------------------------------------------------------
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) <<>>
An isolate makes its contents a single neutral unit as far as the surrounding text is
concerned, so the inserted run can neither reorder the text around it nor be reordered by
it. FSI picks the direction from the first strong character INSIDE the isolate, which is
what you want for user-supplied content whose language you do not know at build time.
Balanced example — an Arabic sentence quoting an LTR product name:
المنتج Novus File Manager جاهز.
EMBEDDINGS — the legacy mechanism, deprecated in favour of isolates
-------------------------------------------------------------------
U+202A LEFT-TO-RIGHT EMBEDDING (LRE) <<>>
U+202B RIGHT-TO-LEFT EMBEDDING (RLE) <<>>
U+202C POP DIRECTIONAL FORMATTING (PDF) <<>>
Balanced example (LRE ... PDF): report-2026.pdf
Embeddings do NOT isolate: neutrals on either side still interact across the boundary,
which is the bug isolates were introduced to fix. An unterminated embedding leaks to theSpecifications
- Controls Present
- LRM, RLM, ALM, LRI, RLI, FSI, PDI, LRE, RLE, PDF
- Controls Named Only
- LRO (U+202D), RLO (U+202E)
- Balanced Examples
- true
- Encoding
- UTF-8
- Guard
- << >> ASCII delimiters around each specimen
- Seed
- 20260807
- Wave
- p7
- Line Endings
- LF
Testing contract
Reference control- Scenario
- Extract each << >> block and compare with the code point named on the same line; then run the file through a bidi-control stripper.
- Expected result
- Ten distinct control code points survive a round trip byte for byte, a stripper removes exactly those and leaves the ASCII prose intact, and a search for U+202D or U+202E finds nothing.
What is a .txt file?
TXT is a plain-text file containing unformatted character data with no styling or structure beyond line breaks. Its interpretation depends on character encoding, most commonly UTF-8, and on line-ending convention. It is the most universal and portable text container.
How to use this file
Use an example TXT to test encoding detection, line-ending (LF versus CRLF) handling, and any tool that reads or streams raw text input.
How to use this file for testing
“Unicode Bidi Controls — LRM, RLM, ALM, isolates and embeddings” is a deterministic Novus Examples fixture for Internationalization, Encoding detection, Localization catalogs. Parallel text and accented, multi-script content — for testing translation pipelines, Unicode handling, and localization tooling.
Documented properties for this file: seed 20260807 · UTF-8 · LF. Compare results against paired or grouped companions on this page when present (clean↔damaged, searchable↔scanned, or format twins) so scores stay reproducible across runs.
Download the file once, keep the path stable in CI or local scripts, and treat the spec table as the contract: dimensions, seeds, field lists, and roles are intentional. Corrupt or invalid samples are labelled as such — expect parsers to fail loudly rather than silently accept them.
Translation-catalog fixtures carry the same message set across formats, each with its native placeholder syntax. Test your i18n loader, catalog converter, or translation-memory tool, and use the RTL and CJK variants to check bidirectional text and Unicode handling.
Load the catalog with your i18n framework and verify placeholder interpolation and plural handling; the RTL and CJK variants exercise bidirectional text and font fallback.
Related files
- stringsApple .strings — UTF-16 LE with BOM (Japanese)The encoding fixture the .strings format needs: a Japanese catalog written as UTF-16 Little Endian with a byte-order mark, which is what Xcode has historically produced and what a UTF-8-only reader turns into mojibake or a decode error. Also carries full-width punctuation and an ideographic space for width and line-breaking tests.

- csvBilingual CSV — English→Arabic RTLBilingual EN→AR RTL CSV SAMPLE for spreadsheet CAT and RTL review tools.

- csvBilingual CSV — English→SpanishBilingual EN→ES CSV SAMPLE for spreadsheet-based localization workflows.

- jsonCrowdin-Style Export — FrenchCrowdin-shaped SAMPLE French bilingual export for TMS round-trip tests.

- jsonCrowdin-Style Export — SpanishCrowdin-shaped SAMPLE bilingual export JSON for localization TMS importers.

- ftlFluent (.ftl) — Arabic RTLMozilla Fluent SAMPLE catalog (Arabic RTL) with placeholders and plural select — for Fluent parsers and CAT tools.

Generated by generation/localization_p7.py. Free for any use, no attribution required — license.