mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-11-16 13:08:25 +00:00
write_escaped_ch compares the decoded rune against utf8.RuneError to detect invalid UTF-8, but a literal U+FFFD decodes to that same rune, so an escaped replacement character was silently deleted. The size returned by DecodeRuneInString already tells the two apart: invalid bytes decode with a size of one, a real U+FFFD with a size of three. Keep the rune when the size is greater than one. |
||
|---|---|---|
| .. | ||
| ansi_c_escapes.go | ||
| shlex.go | ||
| shlex_test.go | ||