issues
search
WebAssembly
/
stringref
Other
37
stars
2
forks
source link
Make wtf-8 and wtf-16 handling more uniform
#22
Closed
wingo
closed
2 years ago
wingo
commented
2 years ago
string.new_wtf8 takes a wtf8_policy immediate, to allow for U+FFFD replacement of any invalid WTF-8 subsequence.
Remove string.measure_utf8, replacing with string.measure_wtf8 with a wtf8_policy immediate.
string.measure_wtf16 returns length in code units, not bytes.
Specify little-endian for string.encode_wtf16.