We currently implement this as throwing on invalid UTF8 bytes, but per https://encoding.spec.whatwg.org/#utf-8-decode we should handle lossy string conversion.