Replaces invalid UTF-8 byte sequences with replacement codepoints U+FFFD
per WHATWG Encoding specification.
Such replacement is a non-injective function, is irreversable and causes collisions.
Prefer using strict throwing methods for cryptography applications.
This is similar to new TextDecoder('utf-8', { ignoreBOM: true }).decode(arr),
but works on all engines.
Decode UTF-8 bytes to a string (loose mode)
Replaces invalid UTF-8 byte sequences with replacement codepoints
U+FFFDper WHATWG Encoding specification.Such replacement is a non-injective function, is irreversable and causes collisions.
Prefer using strict throwing methods for cryptography applications.
This is similar to
new TextDecoder('utf-8', { ignoreBOM: true }).decode(arr), but works on all engines.