3 ms·
How are string encoding discrepancies and related utilities dealt with? My vague understanding is that WASM supports UTF-8 while JS supports (potentially malfor
by 0xfffafaCrash 2y ago
How are string encoding discrepancies and related utilities dealt with? My vague understanding is that WASM supports UTF-8 while JS supports (potentially malformed) UTF-16
- epcoa 2y agoLike a CPU ISA, the WASM abstract machine doesn't have a concept of strings or encoding. It's just bytes in a linear memory. You implement whatever encoding you want. WASM specifies UTF-8 for the encoding of names in its file formats, but that doesn't involve the runtime VM.