← Back to release summary

TextEncoder API: drop support for legacy encodings

Category
Miscellaneous
Type
New or changed feature
Status
Removed (Chrome 53)
Intent stage
None

Summary

The TextEncoder API never supported legacy encodings (such as 'shift_jis', 'windows-1252', etc) except for two UTF-16 variants ('utf-16', 'utf-16be'). Usage was minimal and support was removed from the spec. The TextEncoder constructor will no longer take an argument (if one is passed it is ignored, as is the standard for DOM APIs), and will always encode to "the encoding" (utf-8).

Standards & signals

Docs: https://developer.mozilla.org/en-US/docs/Web/API/TextEncoder (Docs still refer to the utfLabel parameter, which is no longer supported.)

View on chromestatus.com