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
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
encoding | Chrome Full support 38 | Edge Full support 79 | Firefox
Full support
19
| IE No support No | Opera Full support 25 | Safari Full support 10.1 | WebView Android Full support 38 | Chrome Android Full support 38 | Firefox Android
Full support
19
| Opera Android Full support Yes | Safari iOS Full support 10.3 | Samsung 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
- The
TextEncoder
interface it belongs to.