Description
Normalize first and second to NFC, compare their original strings and normalized strings, and mark normalizationCollision only when distinct originals normalize identically.
JSON strings use escape syntax, while decoded JavaScript strings are sequences of UTF-16 units. A supplementary Unicode scalar occupies a surrogate pair, and a lone surrogate is not a complete scalar.
Normalize first and second to NFC, compare their original strings and normalized strings, and mark normalizationCollision only when distinct originals normalize identically.
When to use this tool
Use JSON: JSON Property Name Nfc Collision Pair when you need a decoded UTF-16 or normalization diagnostic.
How to use the tool and how it works
- Enter first, second. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read result. Expand result to inspect the returned fields.
Normalize first and second to NFC, compare their original strings and normalized strings, and mark normalizationCollision only when distinct originals normalize identically.1
NFC applies canonical decomposition followed by canonical composition. Distinct input spellings can therefore normalize to one string; this diagnostic reports that collision rather than changing object keys.2
| Input field | Meaning and units | Accepted input |
|---|---|---|
| first | First value or boundary under the stated formula. | Required. Text. Implementation limit: 8192 Unicode code points and 16384 UTF-16 code units. |
| second | Second value or boundary under the stated formula. | Required. Text. Implementation limit: 8192 Unicode code points and 16384 UTF-16 code units. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| result | Result | Required. Object. |
| result.exactEqual | Exact Equal | Calculated result member: boolean. |
| result.nfcEqual | Nfc Equal | Calculated result member: boolean. |
| result.normalizationCollision | Normalization Collision | Calculated result member: boolean. |
{
"input": {
"first": "é",
"second": "é"
},
"output": {
"result": {
"exactEqual": false,
"nfcEqual": true,
"normalizationCollision": true
}
}
} Limitations and assumptions
- No object is parsed and no case folding or compatibility normalization is applied; matching normalized keys are not automatically renamed.
- Outputs are nested inside result. Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
Alternative or Complementary methods
Use Unicode-aware text processing and a full JSON parser when decoding, comparing, or repairing complete documents.
References
Similar or alternative tools
- Public Place Name Accent Key
Optionally apply JavaScript lowercase, then NFD normalization and removal of all Unicode marks to form key.
- JSON Property Key Surrogate Escape Check
Parse lexeme as a string and scan UTF-16 surrogate pairing.