mirror of
https://github.com/SerenityOS/serenity
synced 2026-05-09 08:32:04 +02:00
The UTF-8 encoding of U+00A0 (NBSP) is the bytes 0xc2 0xa0. By looping over the string to escape byte-by-byte, we replace the second byte with " ", but leave the first byte in the resulting text. This creates an invalid UTF-8 string, with a lone leading byte.