Locale Currency Formats — minor units and invisible separators (JSON)
The structured currency table with the three traps spelled out: minor units belong to the CURRENCY not the locale (JPY 0, USD 2, KWD/BHD/JOD 3), the gap before a trailing symbol is U+00A0 in six of these locales, and CLDR's ar-EG pattern contains an invisible U+200F that breaks naive equality assertions.
{
"note": "Assert on the pattern, the separator code points and the fraction-digit counts. The rendered example strings are illustrative: CLDR revises month abbreviations and spacing between releases, so a byte comparison against them will eventually fail for reasons that are not your bug.",
"sampleValue": 12345.6,
"locales": [
{
"locale": "en-US",
"currency": "USD",
"fractionDigits": 2,
"formatted": "$12,345.60",
"symbolPlacement": "symbol before, no space"
},
{
"locale": "en-GB",
"currency": "GBP",
"fractionDigits": 2,
"formatted": "£12,345.60",
"symbolPlacement": "symbol before, no space"
},
{
"locale": "en-IN",
"currency": "INR",
"fractionDigits": 2,
"formatted": "₹12,345.60",
"symbolPlacement": "symbol before, no space; 3,2,2 grouping above 5 digits"
},
{
"locale": "de-DE",
"currency": "EUR",
"fractionDigits": 2,
"formatted": "12.345,60 €",
"symbolPlacement": "symbol after, separated by U+00A0"
},
{
"locale": "de-CH",
"currency": "CHF",
"fractionDigits": 2,
"formatted": "CHF 12’345.60",
"symbolPlacement": "ISO code before, separated by U+00A0"
},
{
"locale": "fr-FR",
"currency": "EUR",
"fractionDigits": 2,
"formatted": "12 345,60 €",
"symbolPlacement": "symbol after; group U+202F, gap U+00A0"
},
{
"locale": "es-ES",
"currency": "EUR",
"fractionDigits": 2,Specifications
- Locales
- 11
- Traps
- 3
- Sample Value
- 12345.60
- Minor Unit Range
- 0 (JPY) to 3 (KWD, BHD, JOD)
- Rtl Pattern Note
- ar-EG carries U+200F in CLDR's own pattern
- Seed
- 20260807
- Wave
- p7
- Line Endings
- LF
Testing contract
Reference control- Scenario
- Convert each amount to integer minor units using the per-currency exponent, then format back and compare.
- Expected result
- JPY round-trips through 12346 minor units with no decimal point while USD round-trips through 1234560; a hard-coded factor of 100 breaks both JPY and the three-decimal currencies listed in the traps block.
What is a .json file?
JSON (JavaScript Object Notation) is a lightweight, text-based data-interchange format representing objects, arrays, strings, numbers, booleans, and null. It is language-independent, human-readable, and the dominant format for web APIs and configuration. It requires a single well-formed root value.
How to use this file
Use an example JSON file to test parsers and serializers, schema validation, Unicode and number-precision handling, and API request or response processing.
How to use this file for testing
“Locale Currency Formats — minor units and invisible separators (JSON)” is a deterministic Novus Examples fixture for Internationalization, JSON parsing, Encoding detection. Parallel text and accented, multi-script content — for testing translation pipelines, Unicode handling, and localization tooling.
Documented properties for this file: seed 20260807 · 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.
Code examples
import json
with open("currency-formats.json") as f:
data = json.load(f)
print(type(data), len(data))Related files
- txtLocale Separator and Digit Characters — literal specimensEvery separator, sign and digit set a locale-aware formatter has to survive, each present literally between ASCII guards: the no-break and narrow-no-break spaces, de-CH's U+2019 group separator, the Arabic decimal and thousands separators, the four numbering systems' digits, and CLDR's U+2212 MINUS SIGN, which is not the ASCII hyphen.

- jsonNon-Gregorian Calendar Eras — Japanese, ROC, Buddhist, Hijri, HebrewEra and era-year for one instant across five calendar systems. The three whose months and days align with the Gregorian calendar — Japanese (Reiwa 8), ROC (Minguo 115) and Thai Buddhist (2569) — carry a full rendered date; the Hijri and Hebrew entries carry the year only, because their day and month depend on the calculation variant and, for Hijri, on observation. Saying so is the point of the fixture.

- 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.

- txtBidi — bracket mirroring in RTL paragraphs (Hebrew and Arabic)Mirroring is a rendering property of the bidi algorithm, not a transformation of the text: a U+0028 LEFT PARENTHESIS inside an RTL run is DRAWN as ')' while the stored byte never changes. These Hebrew and Arabic lines make that testable, and list the neutral characters that look like they should mirror but do not.

- txtBidi — 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.

- jsonBidi Isolates — UI templates for user-supplied namesThree notification templates in English, Arabic and Hebrew, each given raw and with every interpolation slot wrapped in FSI…PDI, plus four argument sets covering an LTR name in an RTL sentence, an RTL name in an LTR sentence and a name beginning with a neutral character. This is the fixture for the bug where a display name reorders the sentence around it.

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