Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: add polyfill for TextEncoder and TextDecoder #207

Closed
lpd-au opened this issue May 19, 2019 · 1 comment
Closed

Feature Request: add polyfill for TextEncoder and TextDecoder #207

lpd-au opened this issue May 19, 2019 · 1 comment
Labels
feature New feature request library Relates to an Origami library

Comments

@lpd-au
Copy link

lpd-au commented May 19, 2019

What

Add a polyfill for TextEncoder and TextDecoder capable of encoding and decoding UTF-8.

Details

IE11 and EdgeHTML do not have support for the TextEncoder.prototype.encode and TextDecoder.prototype.decode apis. Native implementations of TextEncoder must only encode to UTF-8 but TextDecoder may support other encodings, however it is imo rare to use any other in practice given it's not reversible, so it would be sufficient to throw a RangeError when constructing a TextDecoder for any other encoding.

My use case for this polyfill is in combination with websockets. Websockets support a text and binary mode, and I would like to use this api to decode strings transmitted within the binary data (when aWebSocket.binaryType is set to arraybuffer), as well as send encoded strings back to the server.

Additional Information

MDN has a working polyfill for TextEncoder but not for TextDecoder. I submitted a request to that repo but was directed here instead: mdn/sprints#1508.

@JakeChampion
Copy link
Owner

This was added in #672 and released in v3.96.0

Origami ✨ automation moved this from incoming to complete Nov 27, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 27, 2021
@robertboulton robertboulton removed this from Done in Origami ✨ Jul 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature New feature request library Relates to an Origami library
Projects
None yet
Development

No branches or pull requests

2 participants