Function: decodeText()
decodeText(
bytes,terms):string
Decode bytes to a string under the resolved Specific Character Set, never throwing: an unsupported decoder label falls back to UTF-8, then to Latin-1 (1:1, cannot fail).
Parameters
bytes
Buffer
terms
readonly string[] | undefined
Returns
string
Example
import { decodeText } from "@cosyte/dicom";
const s = decodeText(buf, ["ISO_IR 192"]); // UTF-8