Neatbo.

An invisible space can change an ICU branch

Follow the resolved NBSP report to distinguish an invisible syntax character from literal text and a genuine missing other branch.

The copied pattern was not the whole explanation

The reported nested messages looked valid, but the author later found NBSP U+00A0 between syntax tokens and withdrew the parser-bug claim. The maintainer confirmed that this placement was invalid; NBSP inside literal text remained allowed. The final request was for a warning that exposed copied invisible spacing.

A missing other error therefore needs source evidence. Compare the original codepoint at the reported offset and nearby hidden-character positions before adding branches or changing the parser. Do not normalize all whitespace: it can change legitimate literal output.

  • Retain the exact pattern and parameter JSON from the failing system.
  • Read the mature syntax code, original line/column and U+00A0 byte position.
  • Change the identified character deliberately, then preview with the same locale and parameter types.
  • Save both originals and the complete rendered text so the receiving runtime can reproduce the handoff.

Choose a declared numeric and locale contract

Parameters are scalar Unicode strings or exact mathematical safe integers from −9,007,199,254,740,991 to 9,007,199,254,740,991, checked before JavaScript Number conversion. Decimal/scientific tokens are allowed only when their value is an exact integer. Counts, offsets and =selectors must be nonnegative. Explicit =selectors use canonical decimal spelling: =0 or =[1-9][0-9]*, without a plus sign, leading zeros or −0.

Refuse fractional values, date/time, styles, skeletons, currency, rich tags/angle brackets, MF2 declarations, callbacks and resolvers. Validate required parameters and types in every AST branch, including unselected branches. Report valid unused scalar parameters.

Bare numeric arguments use FormatJS String(value), while number and # use this browser’s Intl locale data. Output may change with runtime locale data; this is not universal ICU4J compatibility. Syntax errors show mature codes, original UTF16 offset/line/column, UTF8 byte offset and nearby U+00A0 positions. Never repair NBSP automatically.

Bare number versus locale number
Pattern: {n} / {n, number}
JSON: {"n":12345}
Locale: en-US
Text: 12345 / 12,345

A preview needs complete evidence

Allow 20,000 AST nodes, 65 unquoted syntactic brace levels, 1,000 parameter names, 128 UTF-8 bytes per name and 65,536 UTF-8 bytes per string value. Quoted literal braces do not consume syntactic depth.

Complete rendered text allows 8 MiB of UTF-8. Preview only 4,000 Unicode codepoints; native copy and rendered-message.txt preserve the whole result. Download both originals and the complete parameter metadata report; hidden-character locations in the report are explicitly a first-200 preview.

Review parameters in every branch, including branches that the chosen values do not select. A screenshot of the first 4,000 codepoints cannot replace the full text or unchanged originals. The report labels its first-200 hidden-character positions as an ancillary preview, while all parameter names and uses remain complete.

Review before release
EvidenceCheck
Original patternNo silent NBSP repair; transport BOM removal recorded
Parameter JSONUnique decoded names; exact integer values; all branches typed
Locale and runtimeExplicit enum choice; receiving runtime may use different Intl data
Complete textFull copy/download, not only the screen preview

References

  • Copied invisible whitespace in ICU syntax

    The author withdrew the original parser-bug claim after locating NBSP in syntax, then requested a visible warning. The three patterns and all six comments were reviewed; browser preference and demand scale remain unknown.

  • FormatJS interpreted MessageFormat AST

    This tool uses the finite plain-text MF1 profile and runtime Intl. It does not promise full ICU4J compatibility, rich tags or MF2.

  • ICU MessageFormat1 syntax

    Select/plural other, offsets, pound substitution and optional apostrophe quoting; styles and date/time stay outside this profile.

Tools in this category

Expand a tool to see its steps, options and supported formats, then open its workspace.

Preview ICU MessageFormat1Render nested ICU select and plural messages locally, and locate invisible syntax characters with original source positions.

Render nested ICU select and plural messages locally, and locate invisible syntax characters with original source positions.

Steps

  1. Paste a message or select one original UTF-8 pattern file, then paste the named parameter JSON.
  2. Choose the explicit locale and preview all branches with correctly typed parameters.
  3. For syntax errors inspect the mature code and visible codepoint positions, correct the source deliberately and retry.
  4. Copy or download the entire text, both unchanged originals and the parameter report before handoff.

Available options

Locale
en-US · en-GB · zh-CN · fr-FR · ru-RU · ar-EG

Explicit locale data in this browser; defaults to en-US.

Capabilities and limits

  • Paste a pattern or select at most one strict UTF-8 message file, up to 1 MiB. The file replaces only the primary pattern; keep the secondary parameter JSON paste, also up to 1 MiB. Original filename labels allow 512 UTF-8 bytes.
  • Remove at most one leading UTF-8 BOM per input as transport only, record it and preserve both original byte sequences. Reject malformed UTF-8 and raw or JSON-escaped unpaired Unicode surrogates. Decoded duplicate parameter keys refuse the whole run.
  • Choose en-US, en-GB, zh-CN, fr-FR, ru-RU or ar-EG. Default en-US. Support literal text, optional apostrophe quoting, bare arguments, select, cardinal plural, selectordinal, offset, =selectors, # and unstyled number. Every select/plural needs other.
  • Parameters are scalar Unicode strings or exact mathematical safe integers from −9,007,199,254,740,991 to 9,007,199,254,740,991, checked before JavaScript Number conversion. Decimal/scientific tokens are allowed only when their value is an exact integer. Counts, offsets and =selectors must be nonnegative. Explicit =selectors use canonical decimal spelling: =0 or =[1-9][0-9]*, without a plus sign, leading zeros or −0.
  • Refuse fractional values, date/time, styles, skeletons, currency, rich tags/angle brackets, MF2 declarations, callbacks and resolvers. Validate required parameters and types in every AST branch, including unselected branches. Report valid unused scalar parameters.
  • Allow 20,000 AST nodes, 65 unquoted syntactic brace levels, 1,000 parameter names, 128 UTF-8 bytes per name and 65,536 UTF-8 bytes per string value. Quoted literal braces do not consume syntactic depth.
  • Complete rendered text allows 8 MiB of UTF-8. Preview only 4,000 Unicode codepoints; native copy and rendered-message.txt preserve the whole result. Download both originals and the complete parameter metadata report; hidden-character locations in the report are explicitly a first-200 preview.
  • Bare numeric arguments use FormatJS String(value), while number and # use this browser’s Intl locale data. Output may change with runtime locale data; this is not universal ICU4J compatibility. Syntax errors show mature codes, original UTF16 offset/line/column, UTF8 byte offset and nearby U+00A0 positions. Never repair NBSP automatically.
Open Preview ICU MessageFormat1 →