[BUG] Updates of files with non-breaking characters fail
Resolved 💬 6 comments Opened Jan 25, 2026 by fluidsonic Closed Apr 2, 2026
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Our files often include non-breaking spaces (U+00A0) for fine-grained control of text wrapping.
Whenever Claude tries to update such a file (of which there are many), it fails and falls back to obscure hex editing.
What Should Happen?
Claude Code should handle non-breaking spaces (U+00A0) just fine, like most other Unicode characters.
Error Messages/Logs
Update(…)
⎿ Error: String to replace not found in file.
…
Steps to Reproduce
- Create a file
test.jswith this content:
``js``
console.log("hello<non-breaking space>world")
- Run
claude "change log message to 'I am groot'" - Allow file/modification access
- Error appears
Error editing fileforUpdate(test.js) - Error appears
Error: Exit code 1forBash(cat -A test.js)
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.19 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗