Source: https://guthlabs.ai/docs/instruments/unicode-ascii-code-point-lookup/implementation/

instrument implementation / implementation-contract

# Unicode / ASCII Code Point Lookup implementation

A source-bound implementation contract for Unicode / ASCII Code Point Lookup; deployment and executable qualification remain separate.

Status: **VERIFIED_CLEAN**Lifecycle: **implementation-contract**

## Binding contract

This record describes what an executable surface must bind and validate. It does not claim that a public calculator, package, or production route is deployed.

**Record owner**: Guth Instruments

**Lifecycle**: verified-clean

**Evidence ID**: t7-018

**Effect**: Computation or source lookup only

## Input and validation requirements

- Reject code points greater than U+10FFFF.

- Reject surrogate code points U+D800..U+DFFF as standalone Unicode scalar values; they must not be encoded as ordinary UTF-8.

- Prevent overlong UTF-8 encodings and reject invalid continuation-byte patterns if decoding is also supported.

- A pasted string can contain multiple scalars, combining marks, variation selectors, or emoji sequences; character-name and encoding output must define whether all scalars or only one grapheme cluster is processed.

- Character-name lookup can fail for unassigned characters, private-use characters, control characters, and characters outside the bundled subset.

- UTF-16 code units are not necessarily equivalent to user-perceived characters; supplementary characters produce two code units.

- If HTML output is inserted into a page, escaping and context handling are required; a numeric character reference is not a general-purpose HTML sanitization mechanism.

## Required corrections

No binding erratum is attached to this unique-name record. Implementers must still preserve the declared units, domain, and failure behavior.

## Inspectable interface fixture

The sample below is evidence for interface and validation tests, not a production implementation.

````
{
  "inputs": {
    "character": "A"
  },
  "expected_outputs": {
    "code_point_decimal": 65,
    "code_point_hex": "U+0041",
    "character_name": "LATIN CAPITAL LETTER A",
    "utf8_bytes": [
      "41"
    ],
    "utf16_code_units": [
      "0041"
    ],
    "html_entity": "&#x41;"
  },
  "reference_data": {
    "unicode_character_record": {
      "code_point": "U+0041",
      "name": "LATIN CAPITAL LETTER A",
      "source_convention": "Unicode Character Database 15.1.0 / Unicode Standard"
    },
    "encoding_rule_fragment": {
      "applicable_range": "U+0000..U+007F",
      "rule": "UTF-8 byte 1 = code point",
      "source_convention": "Unicode Standard, UTF-8 encoding form"
    },
    "utf16_rule_fragment": {
      "applicable_range": "U+0000..U+FFFF excluding surrogates",
      "rule": "one UTF-16 code unit equal to the code point",
      "source_convention": "Unicode Standard, UTF-16 encoding form"
    },
    "html_reference_convention": {
      "rule": "hexadecimal numeric character reference &#xHEX;",
      "source_convention": "WHATWG HTML Living Standard"
    }
  },
  "working": "U+0041 = decimal 65. UTF-8: 0x41 is in U+0000..U+007F, so emit one byte 0x41. UTF-16: BMP non-surrogate value, so emit one code unit 0x0041. HTML numeric reference: code point hexadecimal value 41 gives &#x41;."
}
````

## Other records

[01**Overview**](<https://guthlabs.ai/docs/instruments/unicode-ascii-code-point-lookup/>)[02**Mechanism**](<https://guthlabs.ai/docs/instruments/unicode-ascii-code-point-lookup/mechanism/>)[04**Qualification**](<https://guthlabs.ai/docs/instruments/unicode-ascii-code-point-lookup/qualification/>)

## Sources and evidence

These pointers bind the page to evidence. They do not grant authority or collapse verification into deployment.

- `VERIFIED_LEDGER.json`

- `evidence-tranche7/tranche7-results.json`
