Claude Code v2.1.299 ·
Edit and Write refuse files that are not UTF-8
Edit and Write now refuse files that are not valid UTF-8, contain NUL bytes or are UTF-16 big-endian, and write nothing
You'll noticeTier: how much it should matter to you
3Useful: my rating, 1 to 5
2Signal: worth watching, 1 to 5
File EditingArea: what it touches
ImprovementsKind: in v2.1.299,
ImprovementsSection of the release
Unclear Whether the refusal itself is enforced in this release, or only the messages are present, is not confirmed.
What
Edit and Write are the tools Claude uses to change and create files. They now refuse a file and write nothing when it:
- is not valid UTF-8, the most common text encoding
- contains NUL bytes
- is UTF-16 big-endian, a different text encoding
Claude is told why, and is told to use a shell command that keeps the file's encoding or to ask you.
Why
This keeps files in older or unusual encodings from being quietly damaged when Claude edits them.
How sure we are
Something disagreesSomething we can check disagrees with this entry, or the writer said they could not settle it.
The writer flagged doubtWhether the refusal itself is enforced in this release, or only the messages are present, is not confirmed.
See this entry in the whole of v2.1.299 →