UTF-8 encoder and decoder with simple wide-string type
Wide-string type and I/O type with fast encoder and decoder to and from UTF-8. This decoder is designed for safe interoperability: it identifies invalid and overlong encodings and substitutes the replacement character for each such sequence as soon as it is recognised. It does the same thing with codepoints above the 17-plane Unicode limit.
Project link: https://hg.sr.ht/~cannam/sml-utf8