Re: [whatwg/encoding] Consider adding TextEncoder.containsLoneSurrogates() static (#174)

I was thinking of a different suggestion instead: adding `fatal` option to `TextEncoder`.

Currently it feels incosistent that `TextDecoder` has a mode to strictly check UTF-8 instead of producing replacement characters, but `TextEncoder` doesn't and produces them unconditionally, breaking safe roundtrip.

-- 
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/issues/174#issuecomment-478959889

Received on Tuesday, 2 April 2019 11:46:04 UTC