claude-code - 💡(How to fix) Fix [BUG] Hardcoded enforced character replacement of „“ --> „" always breaks JSON [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#54205Fetched 2026-04-29 06:33:29
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Timeline (top)
labeled ×4commented ×1

Error Message

Error Messages/Logs

RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • 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

extent analysis

TL;DR

The issue can be fixed by disabling or modifying the postprocessing step in Claude Code that replaces German quotation marks with ASCII quotes.

Guidance

  • Investigate the postprocessing logic in Claude Code to identify where the replacement of with " is occurring.
  • Check if there are any configuration options or flags that can be used to disable or customize this replacement behavior.
  • Test the effect of using a different Claude model or version to see if the issue is specific to the Opus model or version 2.1.119.
  • Consider filing a feature request or bug report with the Claude Code developers to request an option to preserve original quotation marks.

Example

No code snippet is provided as the issue is related to the internal workings of the Claude Code library.

Notes

The issue seems to be specific to the Opus model and version 2.1.119 of Claude Code, and it is not clear if this is a regression or a new issue. Further investigation is needed to determine the root cause and the best solution.

Recommendation

Apply workaround: Modify the postprocessing step or use a different model/version until a fix is available, as the current behavior is causing issues with JSON output and German citations.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING