-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
TextDecoder('utf-8') doesn’t match spec #16894
Comments
The code snippet above in web browsers(implementing TextDecoder API) should read as following:
|
@jungshik oops… exactly right. I fixed it. |
^ already fixed in v8 (see link above)
|
The relevant commit is v8/v8@6389b7e. Should we cherry-pick this for node 8? |
@tniessen seems like a good idea—means the other UTF-8 handling (v8 internal, and via ICU) will be in line with |
|
I guess we just need to backport
to v8.x, where the TextDecoder API is actually stable; or we can just upgrade ICU to 60 in v8.x LTS. We'll also need tests, as it seems WPT does not currently contain any tests for this behavior. /cc @jasnell |
No please do not backport those commits. V8 and not icu is used for utf -8. Check the code. @jasnell |
Maybe we are looking at different things. The issue I saw is there even
with no icu
El El vie, nov. 10, 2017 a las 6:49 p. m., Timothy Gu <
notifications@github.com> escribió:
… @srl295 <https://github.com/srl295> I have just backported the commits in
my local branch, and this issue was fixed. Can you explain how V8 is used
for UTF-8? If you mean
https://github.com/nodejs/node/blob/e6245030b193db7de9daad1e455f1fcb7ce4daac/lib/internal/encoding.js#L299,
that is for Text*En*coder, not Text*De*coder.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#16894 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AA0Msz5nNG1k08_rsokgYJWXCrFDPTWxks5s1QtVgaJpZM4QXRQa>
.
|
no-icu uses |
@TimothyGu As I said please proceed how you think best if you want to take
this issue.
|
appears to be fixed in 10.x and master |
from discussion in #16876
in Node.js,
But in Safari/FF/Chrome,
think Node.js is wrong here per https://encoding.spec.whatwg.org/#utf-8-decoder
//cc @mathiasbynens
The text was updated successfully, but these errors were encountered: