[BUG] `Write` and `Update` tools normalize unicode double quotes to standard ASCII double quote
Resolved 💬 6 comments Opened Dec 17, 2025 by janpaepke Closed Apr 4, 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?
For some reason both Write and Update tools convert typographic unicode Quotes U+201C (“) and U+201D (”) to the standard double ASCI Quote U+0022 (").
This is particularly problematic when editing json files, as it corrupts them.
What Should Happen?
Preserve the correct unicode symbol.
Error Messages/Logs
Claude code Prompt:
>
1. create a test.txt file and use the Write tool to write the unicode symbol U+201C in it
2. then check the unicode contents of that file
3. if something is unusual, please explain
⏺ Write(test.txt)
⎿ Wrote 1 lines to test.txt
"
⏺ Bash(xxd /Users/janpaepke/dev/test.txt)
⎿ 00000000: 22 "
⏺ Unusual finding: The file contains 0x22 (1 byte), which is the ASCII straight double quote " (U+0022).
However, U+201C is the left double quotation mark " (curly quote), which in UTF-8 should be encoded as 3 bytes: E2 80 9C.
Steps to Reproduce
Use prompt above to reproduce.
It gets even more concerning, if you ask to make the file contents the unicode symbols U+201C and U+201D. This will be normalized to "" and result in an empty file. 😳
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.0.64
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 ↗