Closed GordonSmith closed 1 year ago
I might be missing your point, but tagged_code_units
is meant to be the number of code units relative to the selected encoding. Since the code unit (not to be confused with code point for UTF-8 is a byte, then tagged_code_units
for UTF-8 is indeed the byte length of the string in memory.
@lukewagner thanks for clarifying that!
Assuming
tagged_code_units
is meant to be the string length, then thebyte_length
calculation forutf8
looks wrong here: https://github.com/WebAssembly/component-model/blob/main/design/mvp/canonical-abi/definitions.py#L448C1-L474C57