Raw bytes inside a hyperlink
On Unix a filename can contain bytes that are not valid UTF-8. HyperlinkPath::encode copied every byte from 128 up as is, so a file with a 0xFF byte in its name produced an address that was not a valid URI, and the byte itself landed straight inside the OSC 8 sequence, where the spec only allows bytes from 32 to 126.
Invalid bytes are percent-encoded
The loop now walks utf8_chunks(): valid chunks are encoded as before, with valid non-ASCII characters left alone, and every byte outside UTF-8 becomes %XX, for example bad%FF.txt. The encode_invalid_utf8 test covers single bad bytes, a truncated multibyte sequence and their mix with a valid é.