The encoding label. Must be "mutf-8" or "mutf8" (case-insensitive)
Configuration options for the decoder behavior
The encoding name for this decoder.
This property is provided for compatibility with the WHATWG TextDecoder interface.
Always "mutf-8"
Indicates whether the decoder is in fatal error mode.
When true, the decoder will throw a TypeError when encountering invalid Modified UTF-8 byte sequences. When
false, invalid sequences are replaced with the Unicode replacement character (U+FFFD).
true if error mode is fatal, otherwise false
Indicates whether the decoder ignores Byte Order Marks.
When true, BOM bytes (0xEF 0xBB 0xBF) at the beginning of input are silently ignored. When false, they are
treated as regular characters.
true if BOM should be ignored, otherwise false
Decodes Modified UTF-8 bytes into a JavaScript string.
This method converts Modified UTF-8 encoded bytes back to their original string representation. It supports both single-shot decoding and streaming decoding for processing large amounts of data.
Decoding Behavior:
fatal settingstream is trueThe Modified UTF-8 encoded bytes to decode. Can be any buffer source type
Decoding options, primarily for streaming support
The decoded string
The decoder for Modified UTF-8.
This class provides decoding functionality for the Modified UTF-8 character encoding. The API is designed to be compatible with the WHATWG
TextDecoderinterface while handling the specific requirements of Modified UTF-8.Example
See