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
'use strict'; const { StringDecoder } = require('string_decoder'); const bufs = [ Buffer.from('f6', 'hex'), Buffer.from('9b', 'hex'), Buffer.from('d1', 'hex') ]; const sd = new StringDecoder('utf8'); let str = ''; for (const buf of bufs) str += sd.write(buf); str += sd.end(); console.log(`str = ${str}`) // 2 replacement chars console.log(`orig = ${Buffer.concat(bufs).toString()}`) // 3 replacement chars
Haven’t really looked into this yet, so anybody who’d like to can feel free to do so.
The text was updated successfully, but these errors were encountered:
string_decoder: fix number of replacement chars
f90d6ae
Fixes: nodejs#22626
06f6ac1
test: add string-decoder fuzz test
1b27428
PR-URL: #22709 Fixes: #22626 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
addaleax
No branches or pull requests
Haven’t really looked into this yet, so anybody who’d like to can feel free to do so.
The text was updated successfully, but these errors were encountered: