The TextEncoder represents an encoder for a specific text encoding, such as UTF-8, ISO-8859-2, KOI8-R, GBK, etc. An encoder takes a string and emits an array of encoded bytes.
Creates a new encoder for the given encoding.
The encoding label. Defaults to UTF-8
The name of the encoding.
Encodes the given string and returns the encoded bytes.
The string to encode.
The encoded bytes.
The TextEncoder represents an encoder for a specific text encoding, such as UTF-8, ISO-8859-2, KOI8-R, GBK, etc. An encoder takes a string and emits an array of encoded bytes.