TextDecoder.prototype.encoding

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 Status Comment
Encoding
The definition of 'TextDecoder.encoding' in that specification.
Living Standard Initial definition.

Browser compatibility

DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
encodingChrome Full support 38Edge Full support ≤79Firefox Full support 19
Full support 19
Partial support 18
Notes
Notes Implemented a slightly different version of the spec.
IE No support NoOpera Full support 25Safari Full support 10.1WebView Android Full support 38Chrome Android Full support 38Firefox Android Full support 19
Full support 19
Partial support 18
Notes
Notes Implemented a slightly different version of the spec.
Opera Android Full support YesSafari iOS Full support 10.3Samsung Internet Android Full support 3.0

Legend

Full support
Full support
No support
No support
See implementation notes.
See implementation notes.

See also