MDN self-hosted library · e01.org

TextDecoder: encoding property

Encoding API

no runnable cells web-api-instance-property upstream source

Encoding API

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

Browser compatibility

See also

  • The TextDecoder interface it belongs to.