Decode a response body by the charset its Content-Type names (UTF-8 when it names
none). TextDecoder drops a leading byte order mark, which Buffer#toString keeps and
JSON.parse then rejects, so a BOM added by a gateway cannot turn a valid answer into
a parse error, and an iso-8859-1 body keeps its umlauts. An unknown charset label
is an EntgeltatlasParseError naming it and request (GET <url>). Bytes that are not
valid in the charset become U+FFFD, and replaced counts them: exactly for UTF-8 and the
single-byte charsets; for UTF-16 a U+FFFD the server sent counts too. Shared with obtainKey().
Decode a response body by the charset its Content-Type names (UTF-8 when it names none). TextDecoder drops a leading byte order mark, which Buffer#toString keeps and JSON.parse then rejects, so a BOM added by a gateway cannot turn a valid answer into a parse error, and an
iso-8859-1body keeps its umlauts. An unknown charset label is an EntgeltatlasParseError naming it andrequest(GET <url>). Bytes that are not valid in the charset become U+FFFD, andreplacedcounts them: exactly for UTF-8 and the single-byte charsets; for UTF-16 a U+FFFD the server sent counts too. Shared with obtainKey().