[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

  1. Create a file test.js with this content:

``js
console.log("hello<non-breaking space>world")
``

  1. Run claude "change log message to 'I am groot'"
  2. Allow file/modification access
  3. Error appears Error editing file for Update(test.js)
  4. Error appears Error: Exit code 1 for Bash(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_

View original on GitHub ↗

This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗