[BUG] Hardcoded enforced character replacement of „“ --> „" always breaks JSON
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?
Claude code is postprocessing quite apparently a german „String“ into a „String", i.e. “ --> " .
Asking claude code to create a test file with said characters does not work. it is always replaced.
- opener: bytes \xe2\x80\x9e (U+201E) — works correctly ✓
- closer: byte \x22 (ASCII ", U+0022) — should have been \xe2\x80\x9c (U+201C) ✗
This happens literally always, however hard Claude tries to produce the closing “ character, and it continuously breaks e.g. JSON output that contains german citations in "This is a string with a german „Citation“."
What Should Happen?
Don't force character replacement of „“ --> „" (probably in your postprocessing)
Error Messages/Logs
Steps to Reproduce
Ask Claude code to produce a string containing german „“, as in in "This is a string with a german „Citation“."
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.119
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
Other
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗