{"version":"2.1.296","anchor":"sed-edit-preview-handles-non-utf-8-files","canonical_anchor":"sed-edit-preview-handles-non-utf-8-files","heading":"The preview for sed edits now handles files that are not UTF-8","tier":"notice","area":"Permissions","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.296\/e\/sed-edit-preview-handles-non-utf-8-files","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.296","markdown":"### The preview for `sed` edits now handles files that are not UTF-8\n\nWhen Claude asks to edit a non-UTF-8 file with sed, the permission prompt now says it cannot be previewed instead of showing a garbled diff\n\n**What**\n\nWhen Claude wants to edit a file in place with the `sed` command, Claude Code shows you a preview of the change before you approve it. If the file is not valid UTF-8 (the standard text encoding), the preview now says the file \"is not valid UTF-8, so it cannot be previewed\" instead of showing a diff. Before, the file was read without this check, and the only no-preview message was for files that were too large.\n\n**Why**\n\nFor binary files or files in older encodings such as Latin-1, you no longer see a garbled preview of a `sed -i` edit that does not show what the change really does.\n\n- Area: Permissions\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 1\/5\n- Scope: individual\n- Heads-up: no"}