TextDecoder: encoding property

Note: This feature is available in Web Workers.

The TextDecoder.encoding read-only property returns a string containing the name of the character encoding that this decoder will use.

The encoding is set by the label parameter passed to the constructor, and defaults to utf-8.

Value

A lower-cased ASCII string, which can be one of the following values:

Specifications

See also