Re: [whatwg/encoding] Add TextEncoderStream and TextDecoderStream transform streams (#149)

Is there a reason why `TextDecoderStream` doesn't provide a mode with the semantics of the "decode" algorithm for BOM handling (i.e. use the _encoding_ if there's no BOM but honor the BOM if there is one)? These semantics are necessary to consume `text/plain` and these semantics are hard for developers to get right in the streaming context.

Also, does one input chunk always result in one output chunk that corresponds to potential pending partial code unit sequence and the input chunk except for potential partial code unit sequence at the end of the input chunk? (If not, I'm a bit worried about Web content developing a dependency on browser-specific chunk boundaries where the boundaries are not supposed to mean anything.)

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/encoding/pull/149#issuecomment-412060584

Received on Friday, 10 August 2018 11:55:06 UTC