-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
TextEncoder
and TextDecoder
#926
Comments
It's not a part of ES, however, it's something that could be useful on each platform. I'll think about it. |
Adding support of legacy encodings is too expensive https://github.com/idiocc/text-decoding/blob/master/src/encoding-indexes.js. |
Only UTF8 is required by spec now. The best implementation that we've found is the lightweight one linked on MDN. |
There are some alternatives: |
I have created https://github.com/aleen42/core-web to try to eliminate different behaviours of Web APIs through different browsers and is there any suggestion or lists of collected polyfill? @zloirock |
@aleen42 you could take a look at the project with the same name from @romainmenke. |
TextEncoder
and TextDecoder
There is already good browser support for these, but Node.js does not have these at all, so testing code that uses them is an issue if you're using jest w/ babel or something like that.
Having a polyfill for these that just 'works out of the box' would be great. There's a very good polyfill at the page below.
https://developer.mozilla.org/en-US/docs/Web/API/TextEncoder
The text was updated successfully, but these errors were encountered: