mruby built with MRB_UTF8_STRING enabled does not count characters in the 0x80...0xc0 in broken strings.
Here is the result when built with build_config/host-debug.rb:
p "\x80\x81\x82\x83".size
# => 0 (acctual; currently master 7edbff8c83cd19749da576aca945fcbf64602bd5, mruby-3.3.0, mruby-3.2.0)
# => 4 (expected; mruby-3.1.0, CRuby)
I checked with git bisect and it reported commit 916fd64.
But now it has been replaced by the SWAR technique, so a simple revert is not possible.
I don't know how to fix it, so I'll just report it.
mruby built with
MRB_UTF8_STRINGenabled does not count characters in the0x80...0xc0in broken strings.Here is the result when built with
build_config/host-debug.rb:I checked with
git bisectand it reported commit 916fd64.But now it has been replaced by the SWAR technique, so a simple revert is not possible.
I don't know how to fix it, so I'll just report it.