From 11a2c57c6eeaff0ef963fc6f8b74caa27b147bdb Mon Sep 17 00:00:00 2001 From: Lukasz Kasprzak Date: Mon, 14 Sep 2026 23:24:08 +0200 Subject: text that turns binary further on has no content, like an image --- docs/design.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'docs/design.md') 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 | -- cgit v1.3