You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
What's the correct use of {stream: true} option for Textdecoder.decode #184
but it isn't the case
the first two expression return "abc" and "def" the third give me empty, just like them without the stream option. and I've tried TextDecoder in Nodejs, it have the same behaviour
Activity
ricea commentedon Sep 4, 2019
The
streamoption changes the handling of the end of the input to allow it to be in the middle of a character. Compare:to
Even with
{stream: true}the TextDecoder emits all complete characters as soon as possible.You may find TextDecoderStream a more intuitive way to do the same thing.
lin7sh commentedon Sep 4, 2019
@ricea So it's for multi-byte decoding, that make sense and TextDecoderStream is what I'm looking for, hopefully it'll be available soon
Ensure `decoder.decode` handle cases where the input ends in the midd…