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

@hsivonen wrote:
> Please add a very conspicuous note explaining that unlike in cases where the JS string to DOMString boundary passes through data that doesn't conform to Unicode as a performance optimization / legacy artifact of failure to enforce Unicode conformance, in this case letting code unit sequences that do not conform to Unicode travel across the boundary is an explicit feature with the intent of allowing the sequence of code units to become conforming once concatenated on the other side of the JS string / DOMString boundary.

I'm concerned that this may contradict the [advice from the WebIDL standard](https://heycam.github.io/webidl/#idl-USVString), namely:

> Specifications should only use USVString for APIs that perform text processing and need a string of Unicode scalar values to operate on. Most APIs that use strings should instead be using DOMString, which does not make any interpretations of the code units in the string. When in doubt, use DOMString.

I'd prefer to have some clarity about whether there is a contradiction here and what the resolution should be before adding an editorial note.

-- 
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-360757736

Received on Friday, 26 January 2018 11:16:20 UTC