-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
btoa error with special characters #39088
Comments
That's because |
That's a weird spec.. I can see this mentioned in #3462.. I guess custom implementation will still be the preferred way |
When I pass a string like 𝑯𝒆𝒍𝒍𝒐 I'm getting |
What steps will reproduce the bug?
node -e "console.log(btoa(Buffer.from([0x72, 0xbe, 0x72, 0x91, 0xfb, 0xf6, 0x40, 0x0f, 0x87, 0xc4, 0x45, 0x5e, 0x23, 0xd0, 0x1c, 0xd5])))"
How often does it reproduce? Is there a required condition?
Throws an error
What is the expected behavior?
No error and
cr5ykfv2QA+HxEVeI9Ac1Q==
loggedWhat do you see instead?
The correct implementation of
btoa
which doesn't throw an errorThe text was updated successfully, but these errors were encountered: