Skip to content

Main content

Unicode Escape Braced Digit Budget Tool

Compute unicode escape braced digit budget from explicit bounded inputs.

Loading tool…

Description

Parse one braced Unicode escape and its written digit count.

Unicode code points, UTF-16 units and UTF-8 octets are different representations. A local escape or byte check can report useful structure without establishing that an entire encoded string is well formed.

Parse one braced Unicode escape and its written digit count.

When to use this tool

Use Unicode Escape Braced Digit Budget when inspecting the stated scalar, escape or byte-layout component.

How to use the tool and how it works

  1. Enter token. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read point, digitCount. Use the output convention below.

Parse one braced Unicode escape and its written digit count. Require literal backslash-u braces containing one to six hexadecimal digits and a valid Unicode scalar; return point and digitCount.1

Input fieldMeaning and unitsAccepted input
tokenTokenRequired. Text; maximum UTF-16 length 8192.
Output fieldInterpretationReturned shape
pointPointRequired. Safe integer.
digitCountDigit CountRequired. Safe integer.
json
{
  "input": {
    "token": "\\u{1F600}"
  },
  "output": {
    "point": 128512,
    "digitCount": 5
  }
}

Limitations and assumptions

  • Surrogates and out-of-range values are rejected; the output is not evaluated as source code.
  • 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 a conforming complete decoder for strings and distinguish Unicode scalar validity from source-language or HTML error recovery.

References

  1. Calculation and input contract: decode/unicode-escape-braced-digit-budget — tool.io

Similar or alternative tools