TextDecoderOptions: {
    fatal?: boolean;
    ignoreBOM?: boolean;
}

Options given to the constructor of TextDecoder.

Type declaration

  • Optional fatal?: boolean

    Controls the error mode of the decoder. If set to true an exception is thrown on invalid byte sequences. Otherwise, the replacement code point will be used. Default: false.

  • Optional ignoreBOM?: boolean

    Controls whether the BOM (Byte Order Mark) should be checked. If set to true the BOM will not be checked/removed. Default: false.