{"version":"2.1.299","anchor":"file-read-rejects-non-text-files-via-a-nottext-result","canonical_anchor":"file-read-rejects-non-text-files-via-a-nottext-result","heading":"Reading a non-text file gives a clearer, file-specific error","tier":"notice","area":"Elsewhere","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.299\/e\/file-read-rejects-non-text-files-via-a-nottext-result","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.299","markdown":"### Reading a non-text file gives a clearer, file-specific error\n\nClaude Code now checks a file's encoding when reading it and gives a file-specific error when the file is not text\n\n**What**\n\nWhen Claude Code reads a file, it now checks the file's encoding (how its characters are stored) and marks the file if it is not text, such as an image or program file. Reading a marked file gives an error whose message is built for that file. Before, the error came only when a special decoding option was on and the text contained unreadable characters, and the message was always the same.\n\nWhen reading only part of a file, Claude Code now returns empty content if the first chunk is not UTF-8, the standard text encoding.\n\n**Why**\n\nBinary files are caught more reliably, and the error explains the problem for the specific file.\n\n- Area: Elsewhere\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 1\/5\n- Scope: individual\n- Heads-up: no"}