Interface: TextDecoder
Defined in: types/desktop-engine.d.ts:4387
Decodes bytes: UTF-8, UTF-16LE / BE and the legacy encodings of the Encoding Standard (windows-1252, GBK, gb18030, Big5, Shift_JIS, EUC-JP, EUC-KR, ISO-8859-x, KOI8, ...). The legacy multi-byte ones are decoded by the system: a few characters and how bad bytes are replaced may differ a little from browsers
Properties
encoding
ts
readonly encoding: string;Defined in: types/desktop-engine.d.ts:4389
Lowercased name of the encoding, e.g. "utf-8", "gbk"
fatal
ts
readonly fatal: boolean;Defined in: types/desktop-engine.d.ts:4390
ignoreBOM
ts
readonly ignoreBOM: boolean;Defined in: types/desktop-engine.d.ts:4391
Methods
decode()
ts
decode(input?, options?): string;Defined in: types/desktop-engine.d.ts:4393
stream: true keeps an incomplete character at the end for the next call
Parameters
| Parameter | Type |
|---|---|
input? | ArrayBuffer | ArrayBufferView<ArrayBufferLike> |
options? | { stream?: boolean; } |
options.stream? | boolean |
Returns
string
