Creates text decoder for the given encoding.
The label of the encoding. Defaults to 'utf-8'
Readonly
fatalTrue if error mode is fatal.
Readonly
ignoreTrue if byte order marker is ignored.
Decoded the given input into string and returns it.
Optional
input: The input to decode.
The decoding options.
The decoded string.
The TextDecoder represents a decoder for a specific text encoding, such as UTF-8, ISO-8859-2, KOI8-R, GBK, etc. A decoder takes a stream of bytes as input and emits a stream of code points.