new TextDecoderStream([encoding[, options]])
-
encoding<string> 标识此TextDecoder实例支持的encoding。默认值:'utf-8'。¥
encoding<string> Identifies theencodingthat thisTextDecoderinstance supports. Default:'utf-8'. -
options<Object>-
fatal<boolean> 如果解码失败是致命的,则为true。¥
fatal<boolean>trueif decoding failures are fatal. -
ignoreBOM<boolean> 当true时,TextDecoderStream将在解码结果中包含字节顺序标记。当false时,字节顺序标记将从输出中删除。此选项仅在encoding为'utf-8'、'utf-16be'或'utf-16le'时使用。默认值:false。¥
ignoreBOM<boolean> Whentrue, theTextDecoderStreamwill include the byte order mark in the decoded result. Whenfalse, the byte order mark will be removed from the output. This option is only used whenencodingis'utf-8','utf-16be', or'utf-16le'. Default:false.
-
创建新的 TextDecoderStream 实例。
¥Creates a new TextDecoderStream instance.