WHATWG encoding API for clients and servers