21 aug. 2020 kl. 15.26 skrev Eli Zaretskii : > That is true, but str_as_multibyte simply interprets any valid UTF-8 > sequence as a character, and any invalid sequence as a raw bytes. I > thought this was precisely what you wanted for this use case, no? Sorry, I read the comment for that function and got the impression that it would interpret raw bytes as Latin-1. Fortunately that wasn't true, and using it seems to be a clear improvement. Now a mixture of non-ASCII and raw bytes, like "a\377büc" results in the title "a��büc", which is one � too many but good enough. What about the attached patch then? Only tested on macOS, admittedly.