Encoding API

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

The Encoding API provides a mechanism for handling text in various character encodings, including legacy non-UTF-8 encodings.

The API provides two interfaces: TextDecoder and  TextEncoder.

Reference

 

Tutorials & tools

  • 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.

Specifications

Specification Status Comment
Encoding Living Standard Initial definitions.

Browser compatibility

We're converting our compatibility data into a machine-readable JSON format. This compatibility table still uses the old format, because we haven't yet converted the data it contains. Find out how you can help!

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support

38.0

19.0 (19.0) No support 25 No support
Feature Android Android Webview Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile Chrome for Android
Basic support No support

38.0

19.0 (19.0) No support ? No support

38.0

 

Document Tags and Contributors

Last updated by: sideshowbarker,