Skip to main content
Version: v0.0.4

Interface: CharsetResolution

The outcome of resolving an MSH-18 label (or options.charset override) against Table 0211.

Properties

canonical

readonly canonical: string

The canonical Table-0211 code the label resolved to (e.g. "UTF-8", "8859/1", "ISO IR87"). For an unrecognized label this is the input trimmed + upper-cased, so it is still a stable key for comparison.


decoder

readonly decoder: string

The WHATWG TextDecoder label to decode with when treatment === "decode". Empty when treatment === "verbatim".


recognized

readonly recognized: boolean

true when the label is a recognized HL7 Table-0211 code (whether or not the parser decodes it); false when the label is not in Table 0211. Drives the warning code on the verbatim path: recognized-but-verbatimUNSUPPORTED_CHARSET, unrecognized → UNKNOWN_CHARSET.


treatment

readonly treatment: CharsetTreatment

Whether the parser decodes this set or preserves its bytes verbatim.