aboutsummaryrefslogtreecommitdiff
path: root/docs/design.md
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-09-14 23:24:08 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-09-14 23:24:08 +0200
commit11a2c57c6eeaff0ef963fc6f8b74caa27b147bdb (patch)
tree336b39597f95d6b97b460075cb50371c979e733c /docs/design.md
parentc66a842ce4679a3ffa5504dad39b1402bea75e9f (diff)
downloadkrino-11a2c57c6eeaff0ef963fc6f8b74caa27b147bdb.tar.gz
krino-11a2c57c6eeaff0ef963fc6f8b74caa27b147bdb.zip
text that turns binary further on has no content, like an image
Diffstat (limited to 'docs/design.md')
-rw-r--r--docs/design.md8
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/design.md b/docs/design.md
index 6b94fc8..4fa5b4a 100644
--- a/docs/design.md
+++ b/docs/design.md
@@ -204,9 +204,9 @@ cannot read the file (over `max-read`, a tool missing, failing or timing
out), the exclude holds, and the file is set aside as "(content
unreadable)" with the warning. A file whose format has no text at all (an
image, an archive) is not unreadable: it contains no keyword, so its
-content tests are simply false and raise no warning. A file of no known
-extension that starts as text and holds binary data further on is
-unreadable. An exclude protects files, so a file krino
+content tests are simply false and raise no warning. So is a file of no
+known extension that starts as text and holds binary data further on, such
+as a self-extracting installer. An exclude protects files, so a file krino
could not check is left alone. Mistakes in krino.conf's excludes are
reported even while no directory is included.
@@ -324,7 +324,7 @@ Nothing is deleted, and undo restores them.
| Format | Method |
|---|---|
-| text | known text extensions, or detected from the first 8 KiB: valid UTF-8, or UTF-16 with a BOM, and no NUL bytes. A file detected as text that holds a NUL or invalid UTF-8 further on cannot be read (§4.6, §5.4) |
+| text | known text extensions; any other file whose first 8 KiB start with a UTF-16 BOM, or are valid UTF-8 with no NUL byte and so is the rest of it (one that turns binary further on, like a self-extracting installer, has no content) |
| pdf | `pdftotext -q -enc UTF-8 FILE -`, 30 s timeout |
| docx xlsx pptx odt ods odp epub | zip plus streaming XML, Go standard library |
| html xml | tags removed, entities decoded |