Source: https://guthlabs.ai/docs/instruments/character-encoding-converter-utf-8-16-32-latin-1/implementation/

instrument implementation / implementation-contract

# Character Encoding Converter (UTF-8/16/32, Latin-1) implementation

A source-bound implementation contract for Character Encoding Converter (UTF-8/16/32, Latin-1); 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**: t5-142

**Effect**: Computation or source lookup only

## Input and validation requirements

The specification does not define UTF-16 endianness or how BOM-less UTF-16 input is interpreted. The bytes 00 41 validly decode as U+4100 under UTF-16LE or U+0041 under UTF-16BE, producing different UTF-8 outputs.

## 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": {
    "text": "Cat",
    "source_encoding": "Unicode text",
    "target_encoding": "UTF-16LE"
  },
  "expected_outputs": {
    "utf8_bytes_hex": "43 61 74",
    "utf8_byte_length": 3,
    "utf16le_bytes_hex": "43 00 61 00 74 00",
    "utf16le_byte_length": 6,
    "utf32le_bytes_hex": "43 00 00 00 61 00 00 00 74 00 00 00",
    "utf32le_byte_length": 12,
    "latin1_bytes_hex": "43 61 74",
    "latin1_byte_length": 3,
    "target_bytes_hex": "43 00 61 00 74 00",
    "invalid_sequence_warnings": []
  },
  "working": "U+0043, U+0061, and U+0074 are each in U+0000-U+007F, so UTF-8 length = 1+1+1 = 3 bytes. Each is a BMP scalar, so UTF-16LE length = 2+2+2 = 6 bytes. UTF-32LE length = 4+4+4 = 12 bytes. All three code points are <= U+00FF, so Latin-1 length = 1+1+1 = 3 bytes. UTF-16LE encoding is U+0043 -> 43 00, U+0061 -> 61 00, U+0074 -> 74 00."
}
````

## Other records

[01**Overview**](<https://guthlabs.ai/docs/instruments/character-encoding-converter-utf-8-16-32-latin-1/>)[02**Mechanism**](<https://guthlabs.ai/docs/instruments/character-encoding-converter-utf-8-16-32-latin-1/mechanism/>)[04**Qualification**](<https://guthlabs.ai/docs/instruments/character-encoding-converter-utf-8-16-32-latin-1/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-tranche5/tranche5-results.json`
