We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
1.0.2
Linux 5.15.90.1-microsoft-standard-WSL2 x86_64 unknown
const decoder = new TextDecoder('utf-8'); const first = decoder.decode(new Uint8Array([226, 153]), { stream: true }); const second = decoder.decode(new Uint8Array([165]), { stream: true }); console.log({first, second});
first should be an empty string and second should return a ♥ string
first
second
♥
Both first and second are populated with incorrect values
No response
The text was updated successfully, but these errors were encountered:
Was hoping that I could use the stream option as an alternative to the missing TextDecoderStream API, but ran into this same bug.
I'd actually prefer if bun threw an error when passing stream: true, since it can lead to quite subtle bugs.
stream: true
Sorry, something went wrong.
TextDecoderStream
TextEncoderStream
TextDecoder.decode("", { stream: true})
Successfully merging a pull request may close this issue.
What version of Bun is running?
1.0.2
What platform is your computer?
Linux 5.15.90.1-microsoft-standard-WSL2 x86_64 unknown
What steps can reproduce the bug?
What is the expected behavior?
first
should be an empty string andsecond
should return a♥
stringWhat do you see instead?
Both
first
andsecond
are populated with incorrect valuesAdditional information
No response
The text was updated successfully, but these errors were encountered: