mirror of
https://github.com/SerenityOS/serenity.git
synced 2026-11-07 04:29:30 -10:00
`s_restricted_characters` contains code points, not UTF-8 bytes. Previously, LibXML errored out on the string '中文' since it contains the byte 0x96, which is in the restricted char set. But this only happened on ABIs where char is signed as this UTF-8 byte had the most significant bit set, therefore the comparison was never true for bytes >= 0x80. Since `Utf8CodePointIterator::index()` doesn't exist, the byte offset is now calculated using `it.ptr() - view.bytes()`. This makes LibXML/TestParser pass on non-x86.