{
  "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,
      "formatted": "12.345,60 €",
      "symbolPlacement": "symbol after, separated by U+00A0"
    },
    {
      "locale": "pl-PL",
      "currency": "PLN",
      "fractionDigits": 2,
      "formatted": "12 345,60 zł",
      "symbolPlacement": "symbol after, separated by U+00A0"
    },
    {
      "locale": "ru-RU",
      "currency": "RUB",
      "fractionDigits": 2,
      "formatted": "12 345,60 ₽",
      "symbolPlacement": "symbol after, separated by U+00A0"
    },
    {
      "locale": "ja-JP",
      "currency": "JPY",
      "fractionDigits": 0,
      "formatted": "￥12,346",
      "symbolPlacement": "FULLWIDTH YEN U+FFE5 before; JPY has ZERO fraction digits"
    },
    {
      "locale": "ar-EG",
      "currency": "EGP",
      "fractionDigits": 2,
      "formatted": "١٢٬٣٤٥٫٦٠ ج.م.",
      "symbolPlacement": "symbol after; CLDR wraps the whole pattern in U+200F RLM"
    }
  ],
  "traps": [
    {
      "id": "fraction-digits-are-per-currency",
      "summary": "The number of decimal places belongs to the CURRENCY, not the locale.",
      "examples": [
        {
          "currency": "JPY",
          "minorUnits": 0,
          "note": "12346, rounded — no decimal point at all"
        },
        {
          "currency": "USD",
          "minorUnits": 2,
          "note": "12345.60"
        },
        {
          "currency": "KWD",
          "minorUnits": 3,
          "note": "12345.600 — Kuwaiti dinar has three"
        },
        {
          "currency": "BHD",
          "minorUnits": 3,
          "note": "Bahraini dinar, also three"
        },
        {
          "currency": "JOD",
          "minorUnits": 3,
          "note": "Jordanian dinar, also three"
        }
      ],
      "why": "Storing money as integer minor units requires the per-currency exponent; hard-coding 100 silently divides JPY by 100 and multiplies KWD by 10."
    },
    {
      "id": "the-gap-is-not-a-space",
      "summary": "Six locales here separate the amount from the symbol with U+00A0, not U+0020.",
      "why": "Splitting on ' ' leaves the symbol attached to the number, and a snapshot test written by copy-pasting from a browser will disagree with one written by hand."
    },
    {
      "id": "rtl-currency-is-marked",
      "summary": "CLDR's ar-EG currency pattern contains U+200F RIGHT-TO-LEFT MARK.",
      "why": "Two 'identical looking' strings differ by an invisible character, so equality assertions fail with an unreadable diff. Compare after stripping bidi controls."
    }
  ]
}
