You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 22, 2023. It is now read-only.
The compiler / VM is not processing strings properly. It is always considering one byte per character, but this is not true for UTF-8 strings. We should probably add an 'utf8Size' opcode in addition to the current 'size' one. The compiler must use the correct opcode when dealing with strings.
There may be other places and opcodes to be added, like the 'substring' method (I don know how it is implemented, but I can confirm that it considers 1 byte per character).
What do you mean by another encoding? We only support UTF-8, right? We can call it unicodeSize if that is the matter, but it does have a problem that has to be fixed.
This seems more appropriate to add to neo than neo-vm. NeoVM doesn't have a string type, so it seems odd to have a string length opcode in the VM.
Since Neo leverages NeoVM ByteStrings and Buffers to store UTF8 strings, it makes sense to me that there should be mechanism in Neo.dll to calculate the length of a UTF8 string that is multibyte character aware
Hi,
The compiler / VM is not processing strings properly. It is always considering one byte per character, but this is not true for UTF-8 strings. We should probably add an 'utf8Size' opcode in addition to the current 'size' one. The compiler must use the correct opcode when dealing with strings.
There may be other places and opcodes to be added, like the 'substring' method (I don know how it is implemented, but I can confirm that it considers 1 byte per character).
Related to neo-project/neo-devpack-dotnet#681
The text was updated successfully, but these errors were encountered: