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

Incorrect toString for invalid UTF8 multibyte codepoints #305

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mischnic
Copy link
Contributor

@mischnic mischnic commented Dec 8, 2021

For example Buffer.from(Buffer.from([0xE0, 0xAC]).toString()) produces <Buffer ef bf bd> with the native Node Buffer while this package currently outputs <Buffer ef bf bd ef bf bd>. So it somehow tries to match multiple bytes even if some of them are missing and doesn't emit a replacement character for every single byte.

This only adds failing tests because I'm not sure how this should be fixed

@dcousens dcousens marked this pull request as ready for review October 8, 2023 02:43
@mischnic mischnic force-pushed the incorrect-tostring-replacement branch from 5d37ad9 to 44719cf Compare November 25, 2023 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant