Description
Combine the pair as 65536 + (high - 55296) × 1024 + low - 56320 and return scalar and text.
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.
Combine the pair as 65536 + (high - 55296) × 1024 + low - 56320 and return scalar and text.
When to use this tool
Use JSON String Utf16 Pair Assembly when you need a decoded UTF-16 or normalization diagnostic.
How to use the tool and how it works
- Enter high, low. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read scalar, text. Use the output convention below.
Require high in 55296-56319 and low in 56320-57343. Combine the pair as 65536 + (high - 55296) × 1024 + low - 56320 and return scalar and text.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| high | High | Required. Safe integer; minimum 55296; maximum 56319. |
| low | Low | Required. Safe integer; minimum 56320; maximum 57343. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| scalar | Scalar | Required. Safe integer. |
| text | Text | Required. Text; maximum UTF-16 length 8192. |
{
"input": {
"high": 55357,
"low": 56832
},
"output": {
"scalar": 128512,
"text": "😀"
}
} Limitations and assumptions
- Both units must form a valid pair; this does not parse JSON escapes or normalize the resulting character.
- 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.
- Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.
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
- JSON String Utf16 Codeunit Escape
Format codeUnit in 0-65535 as a lowercase four-digit JSON Unicode escape.
- JSON Unpaired Surrogate Lexeme Flag
Parse lexeme as a JSON string and scan its UTF-16 units.