Before we were calculating the new "length" of the string accidentally assuming all "characters" were 1 codeunit and not adjusting this to consider "characters" that take more than 1 codeunit (possibly because of how the Base.chop(::AbstractString) method delegates this final adjustment to the SubString constructor)
I think this is now correct for strings with multi-byte "characters" anywhere in the string... but this stuff make my head hurt so i'm mostly relying on testcases for that and someone should double-check the logic 😅
Before we were calculating the new "length" of the string accidentally assuming all "characters" were 1 codeunit and not adjusting this to consider "characters" that take more than 1 codeunit (possibly because of how the
Base.chop(::AbstractString)
method delegates this final adjustment to theSubString
constructor)I think this is now correct for strings with multi-byte "characters" anywhere in the string... but this stuff make my head hurt so i'm mostly relying on testcases for that and someone should double-check the logic 😅