Re: [w3c/push-api] Support throwing exception from text method during UTF-8 decode (#276)

We depend on the [UTF-8 decode](https://encoding.spec.whatwg.org/#utf-8-decode) operation defined in the Encoding spec. The default error mode for decoders [is defined to be `replacement`](https://encoding.spec.whatwg.org/#concept-encoding-run) instead of `fatal`, which means we shouldn't throw. Replacement characters will be inserted instead.

Is my reading correct, @annevk? That matches at least Chrome's implementation.

Would we want to explicitly override the error mode? I'm inclined not to, since our closest sibling method on [`Body`](https://fetch.spec.whatwg.org/#dom-body-text) [doesn't either](https://fetch.spec.whatwg.org/#concept-body-package-data).

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/push-api/issues/276#issuecomment-323785379

Received on Monday, 21 August 2017 16:04:22 UTC