This is an experimental technology
Because this technology's specification has not stabilized, check the compatibility table for the proper prefixes to use in various browsers. Also note that the syntax and behavior of an experimental technology is subject to change in future versions of browsers as the spec changes.
The Encoding API defines allows to deal with text encoded with different methods. It mainly allows to handle legacy content, encrypted with old methods, as it requires new content to be encoded using UTF-8.
It provides two interfaces: a decoding interface, TextDecoder
, allowing to decode texts encoded with a wide range a method; and an encoding interface TextEncoder
allowing to encode string with recommended methods only.
ReferenceEdit
Tutorials & toolsEdit
- A shim allowing to use this interface in browsers that don't support it.
StringView
– a C-like representation of strings based on typed arrays.
SpecificationsEdit
Specification | Status | Comment |
---|---|---|
Encoding | Living Standard | Initial definitions. |
Browser compatibilityEdit