TextEncoder converts strings to UTF-8 encoded bytes in Uint8Array.
TextEncoder
To decode UTF-8 bytes into strings, use TextDecoder.