Re: [whatwg/encoding] Make TextEncoder and TextDecoder be transform streams (#127)

I have been writing tests for surrogate pairs split between chunks and in the process realised there's a problem.

We're now explicitly taking a sequence of code units and normalising it to Unicode. Which means we're doing error handling. Which means the developer should probably be able to specify what type of error handling should be done. Which means adding a fatal option to the constructor. Which means that encode() should logically also support it. Which means that encode() also needs to be changed to take a DOMString. Which is a much more disruptive change than this one.

My preference is to land this first, and then worry about providing control over error behaviour and changing encode() later, since that is a much riskier change.

-- 
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/127#issuecomment-351705473

Received on Thursday, 14 December 2017 13:06:07 UTC