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
Yes, I believe you are correct. I will be removing the UTF8 utilities in the next version of this library (soon, I hope) and recommending one of my other libraries for UTF8 coding, @ethersproject/strings (you can use the toUtf8Bytes and toUtf8String functions), which is far more robust.
I’ll pin this issue too, once I get to the coffee shop to work for the day. :)
The
utf8.fromBytes
routine does not handle 4-byte character sequences.Demo
The character
𠜎
has a 4-byte encoding, so let's try putting that intofromBytes
:Nothing prints. Doing it with buffer works as expected:
The text was updated successfully, but these errors were encountered: