Rust has from_utf8 (which can error), and from_utf8_lossy (which uses replacement characters), but I had to implement from_utf8_lossless myself...