Decoders. These are notionally maps from byte streams to Unicode scalar value streams, i.e. pseudocode type char stream -> int stream.
Applies a decoder to a byte stream. Illegal input byte sequences result in calls to the error handler ~report with error kind `Decoding_error. The illegal bytes are then skipped, and zero or more U+FFFD replacement characters are emitted. The default handler ignores errors.
The locations provided to the error handler by the built-in decoders below in this module are fully accurate only if the input byte stream uses LF characters as line breaks.
val utf_8 : tval utf_16be : tval utf_16le : tval utf_16 : tval iso_8859_1 : tval us_ascii : tval windows_1251 : tval windows_1252 : tval ucs_4be : tval ucs_4le : tval ucs_4be_transposed : tval ucs_4le_transposed : tval ebcdic : tCode page 37.