Note invalid UTF-8 replacement difference

This commit is contained in:
Andy Dixon
2026-02-01 15:33:38 +00:00
parent 62c363b031
commit 59d7e99e0b
+1
View File
@@ -195,6 +195,7 @@ func parseFile(root, path string) (*FileRecord, string) {
}
text := string(data)
if !utf8.ValidString(text) {
// ponytail: one U+FFFD per run of invalid bytes (Rust emits one per maximal subpart); only binary-ish previews differ.
text = strings.ToValidUTF8(text, "�")
}
relative, err := filepath.Rel(root, path)