TextDecoder.prototype.encoding

Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The TextDecoder.prototype.encoding read-only property returns a DOMString containing the name of the decoding algorithm used by the specific decoder.

It can be one of the following values:

Syntax

var b = decoder.decoding;

Specifications

Specification
Encoding
# ref-for-dom-textdecoder-encodingā‘ 

Browser compatibility

BCD tables only load in the browser

See also