TextEncoder.encoding

The TextEncoder.encoding read-only property returns a DOMString containing the name of the encoding algorithm used by the specific encoder.

It can only have the following value utf-8.

Syntax

b = encoder.encoding;

Specifications

Specification Status Comment
Encoding
The definition of 'TextEncoder.encoding' in that specification.
Living Standard Initial definition.

Browser compatibility

DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
encoding
Experimental
Chrome Full support 38Edge Full support 79Firefox Full support 19
Full support 19
Full support 18
Notes
Notes Firefox 18 implemented an earlier and slightly different version of the specification.
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
Full support 18
Notes
Notes Firefox 18 implemented an earlier and slightly different version of the specification.
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
Experimental. Expect behavior to change in the future.
Experimental. Expect behavior to change in the future.
See implementation notes.
See implementation notes.

See also