Bidi — where a mark is actually required (Arabic)
Six Arabic sentences containing a Latin filename, a phone number, a version range, a mixed-script path, a percentage and a bracketed insertion — each shown first as a translator usually delivers it and then with the one invisible character that makes it render correctly. The two forms differ by exactly one code point.
Neutral runs in Arabic text — where a mark is actually required
===============================================================
Each case below is given twice: WITHOUT the mark (how the string usually arrives from a
translator) and WITH it (what renders correctly). The two lines differ by exactly one invisible
character, so a diff tool that ignores them will show them as identical.
1. A trailing Latin identifier followed by Arabic punctuation
without: تم رفع الملف report-2026.pdf.
with: تم رفع الملف report-2026.pdf.
why: the full stop is neutral and sits between an LTR run and the RTL paragraph, so without the
isolate it can attach to the wrong side and render at the far left of the line.
2. A phone number inside an Arabic sentence
without: اتصل على 555-0143 للحصول على المساعدة.
with: اتصل على 555-0143 للحصول على المساعدة.
why: the hyphen between two European digit runs is neutral; ALM pins the whole number so the
segments do not swap and render as 0143-555.
3. A version range
without: الإصدارات 2.4 - 3.1 مدعومة.
with: الإصدارات 2.4 - 3.1 مدعومة.
why: the spaces and the hyphen are all neutral, and the two numbers reorder without the isolate.
4. A file path with a mixed-script component
without: احفظ في C:\Users\رنا\Documents
with: احفظ في C:\Users\رنا\Documents
why: nested isolates — an RTL name inside an LTR path inside an RTL sentence. FSI is used for
the name because its direction comes from the data, not from the template.
5. A percentage and a currency amount
without: تم استخدام 87% من 12,345.60 EGP
with: تم استخدام 87% من 12,345.60 EGP
why: the percent sign and the comma are neutral; ALM keeps each measurement together.
6. A bracketed LTR insertion, showing bracket MIRRORING
without: راجع الدليل (Novus File Manager) قبل المتابعة.
with: راجع الدليل (Novus File Manager) قبل المتابعة.
why: in an RTL paragraph the glyph U+0028 LEFT PARENTHESIS is drawn as ")" — mirroring is a
RENDERING property, so the stored code point never changes and a byte test must not
expect it to.
Assert on: (a) the "with" strings still contain their marks after a JSON/PO/XLIFF round trip,
(b) a bidi implementation produces the same visual order for the "with" strings under both
paragraph directions, and (c) stripping the marks turns each "with" line into its "without" twin.
Specifications
- Cases
- 6
- Dir
- rtl
- Marks Used
- FSI, PDI, LRI, ALM
- Pairing
- each case given twice: without the mark and with it
- Encoding
- UTF-8
- Seed
- 20260807
- Wave
- p7
- Line Endings
- LF
Testing contract
Reference control- Scenario
- Render each pair with a bidi implementation, then strip the controls from the 'with' line and diff it against the 'without' line.
- Expected result
- Stripping turns every 'with' line into its 'without' twin exactly; rendering shows the neutral characters (full stop, hyphen, comma, brackets) landing in a different position in each half of every pair.
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
“Bidi — where a mark is actually required (Arabic)” 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.