[encoding] Introduce "output encoding" (#29)

@hsivonen pointed out that when HTML ends up using e.g., the "replacement" encoding to encode something, we would want to label that as `utf-8`, not `replacement`. Therefore, we should introduce a new concept called "output encoding" that is the encoding itself except for `replacement` (and soon hopefully utf-16le/be).

Then we remove replacement's encoder. Make sure the encode hook uses the output encoding of an encoding. And make sure HTML and URL use the encode hook correctly.

---
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/encoding/issues/29

Received on Friday, 22 January 2016 14:21:41 UTC