{"version":"2.1.232","anchor":"edits-preserve-a-file-s-encoding-and-crlf-line-endings","canonical_anchor":"edits-preserve-a-file-s-encoding-and-crlf-line-endings","heading":"Edits preserve a file's encoding and CRLF line endings","tier":"notice","area":"File Editing","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.232\/e\/edits-preserve-a-file-s-encoding-and-crlf-line-endings","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.232","markdown":"### Edits preserve a file's encoding and CRLF line endings\n\nEdits now preserve a file's encoding and Windows CRLF line endings instead of rewriting them.\n\n**What**\n\nThe sed-style edit path now reads the raw bytes of a file, detects its encoding and whether it uses Windows CRLF line endings from the first 4096 bytes, and writes back using both. Previously it assumed a single encoding lookup, which could rewrite line endings.\n\n**Details**\n\n- The synchronous byte-read helper was removed from the filesystem layer; callers use the async read instead.\n\n**Evidence**\n\n`readFileBytes`\n\n- Area: File Editing\n- Tier: You'll notice\n- Useful: 4\/5\n- Signal: 2\/5"}