"Hello world!" belongs to the ASCII subset, while the string
"ÀÈÌÒÙ" does not. A binary string is a concept similar to the ASCII subset, but instead of limiting the range to
127, it allows codepoints until
The reason that brought to use UTF-16 code units as placeholders for
In the past, this had to be simulated by treating the raw data as a string and using the
charCodeAt() method to read the bytes from the data buffer (i.e., using binary strings). However, this is slow and error-prone, due to the need for multiple conversions (especially if the binary data is not actually byte-format data, but, for example, 32-bit integers or floats).
StringView Non native constructor is one level above typed arrays and provides a C-like interface for strings.